diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 389f73290895..16de53c916db 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1025,6 +1025,12 @@ # ServiceLabel: %Elastic %Mgmt # ServiceOwners: @ArthurMa1978 +# PRLabel: %Grafana +/sdk/grafana/Azure.ResourceManager.*/ @qingquanzhao + +# ServiceLabel: %Grafana %Mgmt +# ServiceOwners: @qingquanzhao + # PRLabel: %Hardware Security Modules /sdk/hardwaresecuritymodules/Azure.ResourceManager.*/ @emmeliaAra diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 470cebeef2cf..62370495fb4a 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -48,6 +48,7 @@ "sdk/machinelearningservices/*/api/*.cs", "sdk/modelsrepository/*/api/*.cs", "sdk/monitor/Azure.ResourceManager.Monitor/api/*.cs", + "sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/api/*.cs", "sdk/objectanchors/*/api/*.cs", "sdk/openai/Azure.AI.OpenAI/tests/Assets/playback_test_config.json", "sdk/purview/*/api/*.cs", @@ -159,6 +160,7 @@ "skus", "Somaxconn", "southcentralus", + "spatio", "structs", "Sybase", "Sysctls", @@ -428,14 +430,6 @@ "tibt" ] }, - { - "filename": "**/sdk/connectedcache/**/*", - "words": [ - "Gbps", - "Mbps", - "Eflow" - ] - }, { "filename": "**/sdk/connectedvmwarevsphere/**/*", "words": [ @@ -1133,7 +1127,6 @@ "dnsprivateviewocid", "Ords", "Ocid", - "Ocids", "ncharacter", "ocpu", "Iorm", @@ -1144,11 +1137,7 @@ "Tcps", "Ezconnect", "Ezconnectplus", - "Oltp", - "exadb", - "Exadb", - "Exascale", - "exascale" + "Oltp" ] }, { diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 4704e8b2023b..41136739520b 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -119,7 +119,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -288,7 +288,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + @@ -450,7 +450,7 @@ 1.0.0-dev.20250501.1 - 1.0.0-alpha.20250624.1 - 1.0.0-alpha.20250619.1 + 1.0.0-alpha.20250625.1 + 1.0.0-alpha.20250625.3 diff --git a/eng/common/mcp/azure-sdk-mcp.ps1 b/eng/common/mcp/azure-sdk-mcp.ps1 index 4f4fa6d03a48..b56fb4e96a28 100755 --- a/eng/common/mcp/azure-sdk-mcp.ps1 +++ b/eng/common/mcp/azure-sdk-mcp.ps1 @@ -51,7 +51,7 @@ if ($UpdateVsCodeConfig) { } $vscodeConfig.servers = $orderedServers Write-Host "Updating vscode mcp config at $vscodeConfigPath" - $vscodeConfig | ConvertTo-Json -Depth 10 | Set-Content -Path $vscodeConfig -Force + $vscodeConfig | ConvertTo-Json -Depth 10 | Set-Content -Path $vscodeConfigPath -Force } $exe = Install-Standalone-Tool ` diff --git a/eng/common/pipelines/codeowners-linter.yml b/eng/common/pipelines/codeowners-linter.yml index 4fe03ab3f647..cf4d113414d9 100644 --- a/eng/common/pipelines/codeowners-linter.yml +++ b/eng/common/pipelines/codeowners-linter.yml @@ -38,13 +38,10 @@ stages: UserOrgUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/user-org-visibility-blob" steps: - - task: DotNetCoreCLI@2 - displayName: 'Install CodeownersLinter' - inputs: - command: custom - custom: 'tool' - arguments: 'install --global --add-source "$(DotNetDevOpsFeed)" --version "$(CodeownersLinterVersion)" "Azure.Sdk.Tools.CodeownersLinter"' - workingDirectory: '$(Build.SourcesDirectory)/eng/common' + - pwsh: | + dotnet tool install --global --add-source "$(DotNetDevOpsFeed)" --version "$(CodeownersLinterVersion)" "Azure.Sdk.Tools.CodeownersLinter" + displayName: Install CodeownersLinter + workingDirectory: '$(Agent.WorkFolder)' # Some directory outside of the source clone to avoid hitting global.json files when any version of dotnet will work for this install - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - pwsh: | diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 27e07e5c58c0..ff37512dabdc 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20250623.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20250624.4" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.57.0", @@ -26,9 +26,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20250623.2", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20250623.2.tgz", - "integrity": "sha512-nP1qyDNdEj/9nbvoSzn1RACK/zzNKvqXvGoFQy5tx+GZFEwHmZ32II+VYiXJMsytTM9k+BuZEk2yx3tgxkk5jA==" + "version": "3.0.0-beta.20250624.4", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20250624.4.tgz", + "integrity": "sha512-bAQdT0x/uGgAUhX0TTLNjIxe+8yGF8LlocZXfGW8Mc56qsAFDmM8TqsSVyrwIEYvzxnL69/TbgV4A/x3yXemcQ==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.57.0", @@ -131,12 +131,12 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20250623.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20250623.2.tgz", - "integrity": "sha512-kIHGZqWr1qJBngGKIhedK1xM1dC8OCPFuSuMtyBUDl3bJMPh2nhv08hUEqDwk8Cv2WvGOPvMuQzyNF63VyK2HA==", + "version": "0.2.0-beta.20250624.4", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20250624.4.tgz", + "integrity": "sha512-vN7CsREnSqEMa2fY4g/DgnLEp5t4IW+SIAWwQ6zGwFjp1ltYi0m4znYeGUpkd8YxY4HtXlqOFRV8ljRaPzPAwQ==", "license": "MIT", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20250623.2", + "@autorest/csharp": "3.0.0-beta.20250624.4", "@typespec/http-client-csharp": "1.0.0-alpha.20250618.2" }, "peerDependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 48ed96a2b7a1..4e111efc1c67 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20250623.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20250624.4" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.57.0", diff --git a/eng/http-client-csharp-emitter-package-lock.json b/eng/http-client-csharp-emitter-package-lock.json index 5f4775e4b55e..30d462081adc 100644 --- a/eng/http-client-csharp-emitter-package-lock.json +++ b/eng/http-client-csharp-emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250624.1" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250625.3" }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.57.0", @@ -98,12 +98,12 @@ } }, "node_modules/@azure-typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250624.1", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250624.1.tgz", - "integrity": "sha512-4yIWOhGh9ihl25lPyWkuXMwP/xgcfytRdTiR5H/7PhBLRWY2No93DtW+SIrFj7KKZqDLJEa2QCKd/FxDKoGUBw==", + "version": "1.0.0-alpha.20250625.3", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250625.3.tgz", + "integrity": "sha512-UqV4ROg1V36DXZBbdfgWj5JpIjcFnHCzVUd/1948MTFyxCDa1JrSOnLIznKmhIwsjPOX1LU0gKAnmZwSoXQMpg==", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250624.1" + "@typespec/http-client-csharp": "1.0.0-alpha.20250625.1" } }, "node_modules/@babel/code-frame": { @@ -556,9 +556,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250624.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250624.1.tgz", - "integrity": "sha512-6VvNTbQsASv8hJMU4GliUl6bpLEUuqAd2cQJazxhjQQZhtpMmwYxlfOKJ9DJhzsjXshyLrQu8WJLKfD5V7FByQ==", + "version": "1.0.0-alpha.20250625.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250625.1.tgz", + "integrity": "sha512-tvtFsr2cyDFfxTiKENMx17IEkzziUoSkuC2ebArYKWyz5JeFDI9Hr0byunhhtDs/yBlZF4LoKZPQMw4wK9Yo6w==", "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" diff --git a/eng/http-client-csharp-emitter-package.json b/eng/http-client-csharp-emitter-package.json index 9567f7c641a7..0ad2293a1a7a 100644 --- a/eng/http-client-csharp-emitter-package.json +++ b/eng/http-client-csharp-emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250624.1" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250625.3" }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.57.0", diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/MockableResourceProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/MockableResourceProvider.cs index 7b6660d1b44e..7f6ec9814c51 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/MockableResourceProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/MockableResourceProvider.cs @@ -28,6 +28,8 @@ public MockableResourceProvider(CSharpType armCoreType, IReadOnlyList $"{base.BuildNamespace()}.Mocking"; + protected override string BuildName() => $"Mockable{ManagementClientGenerator.Instance.TypeFactory.ResourceProviderName}{ArmCoreType.Name}"; protected override string BuildRelativeFilePath() => Path.Combine("src", "Generated", "Extensions", $"{Name}.cs"); diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ResourceVisitor.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ResourceVisitor.cs index 343d51a24a54..e5977c5306cd 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ResourceVisitor.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ResourceVisitor.cs @@ -19,6 +19,46 @@ internal class ResourceVisitor : ScmLibraryVisitor return type; } + private void TransformResource(InputModelType model, TypeProvider type) + { + if (type is ModelProvider && ManagementClientGenerator.Instance.InputLibrary.IsResourceModel(model)) + { + type.Update( + relativeFilePath: TransformRelativeFilePath(type), + name: TransformName(type)); + + foreach (var serialization in type.SerializationProviders) + { + serialization.Update( + relativeFilePath: TransformRelativeFilePathForSerialization(serialization), + name: TransformName(serialization)); + } + } + } + + // Because we have NamespaceVisitor with VisitType in Azure.Generater, we need to override the namespace with VisitType here + protected override TypeProvider? VisitType(TypeProvider type) + { + if (type is not null) + { + TransformNamespaceForResource(type); + } + return type; + } + + private void TransformNamespaceForResource(TypeProvider type) + { + if (type is ModelProvider model && ManagementClientGenerator.Instance.OutputLibrary.IsResourceModelType(model.Type)) + { + type.Update(@namespace: ManagementClientGenerator.Instance.TypeFactory.PrimaryNamespace); + + foreach (var serialization in type.SerializationProviders) + { + serialization.Update(@namespace: ManagementClientGenerator.Instance.TypeFactory.PrimaryNamespace); + } + } + } + // TODO: Go back and enable this when we have a way to handle the resource model parameters renaming via VisitMethod. // protected override MethodProvider? VisitMethod(MethodProvider method) // { @@ -32,20 +72,6 @@ internal class ResourceVisitor : ScmLibraryVisitor // return base.VisitMethod(method); // } - private void TransformResource(InputModelType model, TypeProvider type) - { - if (type is ModelProvider && ManagementClientGenerator.Instance.InputLibrary.IsResourceModel(model)) - { - type.Update(relativeFilePath: TransformRelativeFilePath(type)); - type.Update(name: TransformName(type)); - foreach (var serialization in type.SerializationProviders) - { - serialization.Update(relativeFilePath: TransformRelativeFilePathForSerialization(serialization)); - serialization.Update(name: TransformName(serialization)); - } - } - } - private static string TransformName(TypeProvider model) => $"{model.Name}Data"; private static string TransformRelativeFilePath(TypeProvider model) diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MgmtTypeSpecExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MgmtTypeSpecExtensions.cs index 6693c8eaed40..97296c05a441 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MgmtTypeSpecExtensions.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MgmtTypeSpecExtensions.cs @@ -12,6 +12,7 @@ using Azure.Core; using Azure.ResourceManager; using Azure.ResourceManager.Resources; +using MgmtTypeSpec.Mocking; namespace MgmtTypeSpec { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecArmClient.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecArmClient.cs index dc340d98fb5c..1b56e6943127 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecArmClient.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecArmClient.cs @@ -7,8 +7,9 @@ using Azure.Core; using Azure.ResourceManager; +using MgmtTypeSpec; -namespace MgmtTypeSpec +namespace MgmtTypeSpec.Mocking { /// public partial class MockableMgmtTypeSpecArmClient : ArmResource diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecResourceGroupResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecResourceGroupResource.cs index 1c5644f9797b..234ebf612f31 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecResourceGroupResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecResourceGroupResource.cs @@ -12,8 +12,9 @@ using Azure.Core; using Azure.ResourceManager; using Azure.ResourceManager.Resources; +using MgmtTypeSpec; -namespace MgmtTypeSpec +namespace MgmtTypeSpec.Mocking { /// public partial class MockableMgmtTypeSpecResourceGroupResource : ArmResource diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooCollection.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooCollection.cs index a4087557c48a..20875613c946 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooCollection.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooCollection.cs @@ -16,7 +16,6 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; using Azure.ResourceManager.Resources; -using MgmtTypeSpec.Models; namespace MgmtTypeSpec { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.Serialization.cs index 4a69bfd864cd..727817571ed3 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.Serialization.cs @@ -13,9 +13,9 @@ using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; -using MgmtTypeSpec; +using MgmtTypeSpec.Models; -namespace MgmtTypeSpec.Models +namespace MgmtTypeSpec { /// Concrete tracked resource types can be created by aliasing this type using a specific property type. public partial class FooData : IJsonModel diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.cs index cbb1de893bf1..7714cc844c81 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.cs @@ -10,9 +10,9 @@ using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; -using MgmtTypeSpec; +using MgmtTypeSpec.Models; -namespace MgmtTypeSpec.Models +namespace MgmtTypeSpec { /// Concrete tracked resource types can be created by aliasing this type using a specific property type. public partial class FooData : TrackedResourceData diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.Serialization.cs index aedfeb439192..bbf9f0b077a9 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.Serialization.cs @@ -8,7 +8,6 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; -using MgmtTypeSpec.Models; namespace MgmtTypeSpec { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs index 11ef07321085..b3e8ff1e404b 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs @@ -14,7 +14,6 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; using Azure.ResourceManager.Resources; -using MgmtTypeSpec.Models; namespace MgmtTypeSpec { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/LongRunningOperation/FooOperationSource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/LongRunningOperation/FooOperationSource.cs index 75cb64659dd5..da90ef65c46c 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/LongRunningOperation/FooOperationSource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/LongRunningOperation/FooOperationSource.cs @@ -12,7 +12,6 @@ using Azure; using Azure.Core; using Azure.ResourceManager; -using MgmtTypeSpec.Models; namespace MgmtTypeSpec { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecModelFactory.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecModelFactory.cs index e8cfc1603648..5851184f75ba 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecModelFactory.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecModelFactory.cs @@ -28,7 +28,7 @@ public static partial class MgmtTypeSpecModelFactory /// The resource-specific properties for this resource. /// The name of the Foo. /// - /// A new instance for mocking. + /// A new instance for mocking. public static FooData FooData(ResourceIdentifier id = default, string @type = default, SystemData systemData = default, IDictionary tags = default, string location = default, FooProperties properties = default, string name = default, ExtendedLocation extendedLocation = default) { tags ??= new ChangeTrackingDictionary(); diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooListResult.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooListResult.cs index 047b1e3e8a1b..7a0934ed9e0e 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooListResult.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooListResult.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using MgmtTypeSpec; namespace MgmtTypeSpec.Models { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PrivateLinkResourceListResult.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PrivateLinkResourceListResult.cs index aed8edde6be9..019e541cdb65 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PrivateLinkResourceListResult.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PrivateLinkResourceListResult.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using MgmtTypeSpec; namespace MgmtTypeSpec.Models { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PrivateLinkResourceData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PrivateLinkResourceData.Serialization.cs index ae7c158d94c1..df1936008ed1 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PrivateLinkResourceData.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PrivateLinkResourceData.Serialization.cs @@ -11,9 +11,9 @@ using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; -using MgmtTypeSpec; +using MgmtTypeSpec.Models; -namespace MgmtTypeSpec.Models +namespace MgmtTypeSpec { /// Concrete proxy resource types can be created by aliasing this type using a specific property type. internal partial class PrivateLinkResourceData : IJsonModel diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PrivateLinkResourceData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PrivateLinkResourceData.cs index af6f059438fc..c9b72e60a6d8 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PrivateLinkResourceData.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PrivateLinkResourceData.cs @@ -9,8 +9,9 @@ using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; +using MgmtTypeSpec.Models; -namespace MgmtTypeSpec.Models +namespace MgmtTypeSpec { /// Concrete proxy resource types can be created by aliasing this type using a specific property type. internal partial class PrivateLinkResourceData : ResourceData diff --git a/eng/packages/http-client-csharp-mgmt/package-lock.json b/eng/packages/http-client-csharp-mgmt/package-lock.json index ef7f90928fdf..b5c4faba1cbc 100644 --- a/eng/packages/http-client-csharp-mgmt/package-lock.json +++ b/eng/packages/http-client-csharp-mgmt/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250619.1" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250625.3" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.19", @@ -215,12 +215,12 @@ "dev": true }, "node_modules/@azure-typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250619.1", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250619.1.tgz", - "integrity": "sha512-TTLa+lOzTVRF0Qe4K75qbcpIaUw2RD4n2tH3DlTXJUs4ct3RO8pVvR6ElI8uloyJI1CN//QwsDeEdCuq8OFh8w==", + "version": "1.0.0-alpha.20250625.3", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250625.3.tgz", + "integrity": "sha512-UqV4ROg1V36DXZBbdfgWj5JpIjcFnHCzVUd/1948MTFyxCDa1JrSOnLIznKmhIwsjPOX1LU0gKAnmZwSoXQMpg==", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250619.2" + "@typespec/http-client-csharp": "1.0.0-alpha.20250625.1" } }, "node_modules/@azure/abort-controller": { @@ -2513,9 +2513,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250619.2", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250619.2.tgz", - "integrity": "sha512-PtJRzOYXag9WMt7dyP3lOWDcWajIG1enwLLOF9vhiD19vhbrAsZzHKAsYarpZEExvzTCH473tAw/YTp/40IMnw==", + "version": "1.0.0-alpha.20250625.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250625.1.tgz", + "integrity": "sha512-tvtFsr2cyDFfxTiKENMx17IEkzziUoSkuC2ebArYKWyz5JeFDI9Hr0byunhhtDs/yBlZF4LoKZPQMw4wK9Yo6w==", "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" diff --git a/eng/packages/http-client-csharp-mgmt/package.json b/eng/packages/http-client-csharp-mgmt/package.json index 2b1186c13f68..0c07a32a20c0 100644 --- a/eng/packages/http-client-csharp-mgmt/package.json +++ b/eng/packages/http-client-csharp-mgmt/package.json @@ -37,7 +37,7 @@ "dist/**" ], "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250619.1" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250625.3" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.19", diff --git a/eng/packages/http-client-csharp/eng/scripts/Generate.ps1 b/eng/packages/http-client-csharp/eng/scripts/Generate.ps1 index a7c152c94342..5f575b49ce80 100644 --- a/eng/packages/http-client-csharp/eng/scripts/Generate.ps1 +++ b/eng/packages/http-client-csharp/eng/scripts/Generate.ps1 @@ -84,6 +84,7 @@ $failingSpecs = @( Join-Path 'http' 'azure' 'resource-manager' 'non-resource' Join-Path 'http' 'azure' 'resource-manager' 'operation-templates' Join-Path 'http' 'azure' 'resource-manager' 'resources' + Join-Path 'http' 'azure' 'resource-manager' 'large-header' ) diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json index e2c15e45bc10..46827c1b7080 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json @@ -50,11 +50,6 @@ "commandName": "Executable", "executablePath": "dotnet" }, - "http-azure-resource-manager-large-header": { - "commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/azure/resource-manager/large-header -g AzureStubGenerator", - "commandName": "Executable", - "executablePath": "dotnet" - }, "http-azure-special-headers-client-request-id": { "commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/azure/special-headers/client-request-id -g AzureStubGenerator", "commandName": "Executable", diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/CollectionResultDefinition.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/CollectionResultDefinition.cs index 96de3e41aa62..241a388f2498 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/CollectionResultDefinition.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/CollectionResultDefinition.cs @@ -266,7 +266,12 @@ private ValueExpression BuildGetNextPage(VariableExpression responseWithTypeVari return _nextPageLocation switch { - InputResponseLocation.Body =>NeedsConversionToUri() ? New.Instance(responseWithTypeVariable.Property(_nextPagePropertyName)) : responseWithTypeVariable.Property(_nextPagePropertyName), + InputResponseLocation.Body => NeedsConversionToUri() ? + new TernaryConditionalExpression( + responseWithTypeVariable.Property(_nextPagePropertyName).NotEqual(Null), + New.Instance(responseWithTypeVariable.Property(_nextPagePropertyName)), + Null) + : responseWithTypeVariable.Property(_nextPagePropertyName), InputResponseLocation.Header => new TernaryConditionalExpression( responseVariable.Property("Headers") .Invoke("TryGetValue", Literal(_nextPagePropertyName), diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs index 38bdaeb37445..5cedd56802cd 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs @@ -8,6 +8,7 @@ namespace Azure.Generator.Utilities internal static class TypeNameUtilities { private const string AzurePackageNamespacePrefix = "Azure."; + private const string AzureResourceManagerPackageNamespacePrefix = "Azure.ResourceManager."; /// /// Returns the name of the RP from the package name using the following: @@ -19,6 +20,10 @@ public static string GetResourceProviderName() { var packageName = AzureClientGenerator.Instance.Configuration.PackageName; var segments = packageName.Split('.'); + if (packageName.StartsWith(AzureResourceManagerPackageNamespacePrefix)) + { + return $"Arm{string.Join("", segments.Skip(2))}"; + } if (packageName.StartsWith(AzurePackageNamespacePrefix)) { if (segments.Length > 2) diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs index 5f42e7826fe9..20660e9c1e34 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs @@ -13,7 +13,9 @@ internal class ModelFactoryRenamerVisitor : ScmLibraryVisitor { if (type is ModelFactoryProvider && type.CustomCodeView == null) { - type.Update(name: $"{TypeNameUtilities.GetResourceProviderName()}ModelFactory"); + // Reset the type provider so that all the methods will be recomputed after the name change. + // This is necessary because the name change will impact the custom code view calculation. + type.Update(name: $"{TypeNameUtilities.GetResourceProviderName()}ModelFactory", reset: true); } return type; diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfTWithStringProperty.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfTWithStringProperty.cs index 62ac4a47c39a..ef60cda8bf63 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfTWithStringProperty.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyOfTWithStringProperty.cs @@ -43,7 +43,7 @@ public CatClientGetCatsCollectionResultOfT(global::Samples.CatClient client, glo yield break; } global::Samples.Models.Page responseWithType = ((global::Samples.Models.Page)response); - nextPage = new global::System.Uri(responseWithType.NextCat); + nextPage = (responseWithType.NextCat != null) ? new global::System.Uri(responseWithType.NextCat) : null; yield return global::Azure.Page.FromValues(((global::System.Collections.Generic.IReadOnlyList)responseWithType.Cats), nextPage?.AbsoluteUri, response); } while ((nextPage != null)); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyWithStringProperty.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyWithStringProperty.cs index ea55b046a138..57b1b5d27510 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyWithStringProperty.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Providers/CollectionResultDefinitions/TestData/NextLinkTests/NextLinkInBodyWithStringProperty.cs @@ -48,7 +48,7 @@ public CatClientGetCatsCollectionResult(global::Samples.CatClient client, global { items.Add(global::System.BinaryData.FromObjectAsJson(item)); } - nextPage = new global::System.Uri(responseWithType.NextCat); + nextPage = (responseWithType.NextCat != null) ? new global::System.Uri(responseWithType.NextCat) : null; yield return global::Azure.Page.FromValues(items, nextPage?.AbsoluteUri, response); } while ((nextPage != null)); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/ModelFactoryRenamerVisitorTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/ModelFactoryRenamerVisitorTests.cs index 94f8f00d0b72..c6f1cf8fee2c 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/ModelFactoryRenamerVisitorTests.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/ModelFactoryRenamerVisitorTests.cs @@ -40,7 +40,7 @@ public void MgmtPlaneModelFactoryIsNamedCorrectly() var modelFactory = plugin.Object.OutputLibrary.TypeProviders.OfType().SingleOrDefault(); Assert.IsNotNull(modelFactory); - Assert.AreEqual("SomeServiceModelFactory", modelFactory!.Type.Name); + Assert.AreEqual("ArmSomeServiceModelFactory", modelFactory!.Type.Name); } [Test] @@ -58,6 +58,42 @@ public void GenericModelFactoryIsNamedCorrectly() Assert.AreEqual("SamplesModelFactory", modelFactory!.Type.Name); } + [Test] + public void CachedMethodsAreResetAfterRenaming() + { + var model = InputFactory.Model("SomeModel"); + var plugin = MockHelpers.LoadMockGenerator( + inputModels: () => [model], + configurationJson: "{ \"package-name\": \"Azure.Messaging.SomeService\" }"); + + var visitor = new TestModelRenamerVisitor(); + visitor.InvokeVisitLibrary(plugin.Object.OutputLibrary); + + var modelFactory = plugin.Object.OutputLibrary.TypeProviders.OfType().SingleOrDefault(); + Assert.IsNotNull(modelFactory); + Assert.AreEqual(1, modelFactory!.Methods.Count); + Assert.AreEqual("RenamedModel", modelFactory.Methods[0].Signature.Name); + } + + private class TestModelRenamerVisitor : ModelFactoryRenamerVisitor + { + protected override TypeProvider? VisitType(TypeProvider type) + { + if (type is ModelProvider) + { + type.Update(name: "RenamedModel"); + return type; + } + + return base.VisitType(type); + } + + public void InvokeVisitLibrary(OutputLibrary library) + { + base.VisitLibrary(library); + } + } + private class TestModelFactoryRenamerVisitor : ModelFactoryRenamerVisitor { public void InvokeVisitLibrary(OutputLibrary library) diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkAsyncCollectionResult.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkAsyncCollectionResult.cs index 23b30a8e54da..8fca2bd3542e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkAsyncCollectionResult.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkAsyncCollectionResult.cs @@ -48,7 +48,7 @@ public override async IAsyncEnumerable> AsPages(string continua { items.Add(BinaryData.FromObjectAsJson(item)); } - nextPage = new Uri(responseWithType.Next); + nextPage = responseWithType.Next != null ? new Uri(responseWithType.Next) : null; yield return Page.FromValues(items, nextPage?.AbsoluteUri, response); } while (nextPage != null); diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT.cs index 828f5dba1c0e..9cdbf253e41f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkAsyncCollectionResultOfT.cs @@ -43,7 +43,7 @@ public override async IAsyncEnumerable> AsPages(string continua yield break; } ListWithStringNextLinkResponse responseWithType = (ListWithStringNextLinkResponse)response; - nextPage = new Uri(responseWithType.Next); + nextPage = responseWithType.Next != null ? new Uri(responseWithType.Next) : null; yield return Page.FromValues((IReadOnlyList)responseWithType.Things, nextPage?.AbsoluteUri, response); } while (nextPage != null); diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkCollectionResult.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkCollectionResult.cs index 02d51ab95f56..75724f12b964 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkCollectionResult.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkCollectionResult.cs @@ -47,7 +47,7 @@ public override IEnumerable> AsPages(string continuationToken, { items.Add(BinaryData.FromObjectAsJson(item)); } - nextPage = new Uri(responseWithType.Next); + nextPage = responseWithType.Next != null ? new Uri(responseWithType.Next) : null; yield return Page.FromValues(items, nextPage?.AbsoluteUri, response); } while (nextPage != null); diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkCollectionResultOfT.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkCollectionResultOfT.cs index ca0753580626..6bdc195b97b4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkCollectionResultOfT.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClientGetWithStringNextLinkCollectionResultOfT.cs @@ -42,7 +42,7 @@ public override IEnumerable> AsPages(string continuationToken, yield break; } ListWithStringNextLinkResponse responseWithType = (ListWithStringNextLinkResponse)response; - nextPage = new Uri(responseWithType.Next); + nextPage = responseWithType.Next != null ? new Uri(responseWithType.Next) : null; yield return Page.FromValues((IReadOnlyList)responseWithType.Things, nextPage?.AbsoluteUri, response); } while (nextPage != null); diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/Configuration.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/Configuration.json deleted file mode 100644 index 418c2322e066..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/Configuration.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "package-name": "Azure.ResourceManager.LargeHeader", - "license": { - "name": "MIT License", - "company": "Microsoft Corporation", - "link": "https://mit-license.org", - "header": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.", - "description": "Copyright (c) Microsoft Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Azure.ResourceManager.LargeHeader.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Azure.ResourceManager.LargeHeader.csproj deleted file mode 100644 index 320063025fae..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Azure.ResourceManager.LargeHeader.csproj +++ /dev/null @@ -1,41 +0,0 @@ - - - This is the Azure.ResourceManager.LargeHeader client library for developing .NET applications with rich experience. - SDK Code Generation Azure.ResourceManager.LargeHeader - 1.0.0-beta.1 - Azure.ResourceManager.LargeHeader - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/CancelResult.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/CancelResult.Serialization.cs deleted file mode 100644 index d7d050849d6f..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/CancelResult.Serialization.cs +++ /dev/null @@ -1,39 +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; -using Azure; - -namespace Azure.ResourceManager.LargeHeader -{ - public partial class CancelResult : IJsonModel - { - internal CancelResult() => throw null; - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - CancelResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual CancelResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - CancelResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual CancelResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static explicit operator CancelResult(Response result) => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/CancelResult.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/CancelResult.cs deleted file mode 100644 index b6e9bab45fc2..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/CancelResult.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.LargeHeader -{ - public partial class CancelResult - { - public bool Succeeded => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClient.cs deleted file mode 100644 index f8e2a584102d..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClient.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.ResourceManager.LargeHeader -{ - public partial class LargeHeaderClient - { - protected LargeHeaderClient() => throw null; - - public LargeHeaderClient(Guid subscriptionId, TokenCredential credential) : this(new Uri("https://management.azure.com"), subscriptionId, credential, new LargeHeaderClientOptions()) => throw null; - - public LargeHeaderClient(Uri endpoint, Guid subscriptionId, TokenCredential credential, LargeHeaderClientOptions options) => throw null; - - public virtual HttpPipeline Pipeline => throw null; - - public virtual LargeHeaders GetLargeHeadersClient() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClientBuilderExtensions.cs deleted file mode 100644 index 5b4bcf3b48e8..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClientBuilderExtensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Diagnostics.CodeAnalysis; -using Azure.Core.Extensions; -using Azure.ResourceManager.LargeHeader; - -namespace Microsoft.Extensions.Azure -{ - public static partial class LargeHeaderClientBuilderExtensions - { - public static IAzureClientBuilder AddLargeHeaderClient(this TBuilder builder, Uri endpoint, Guid subscriptionId) - where TBuilder : IAzureClientFactoryBuilderWithCredential => throw null; - - [RequiresUnreferencedCode("Requires unreferenced code until we opt into EnableConfigurationBindingGenerator.")] - [RequiresDynamicCode("Requires unreferenced code until we opt into EnableConfigurationBindingGenerator.")] - public static IAzureClientBuilder AddLargeHeaderClient(this TBuilder builder, TConfiguration configuration) - where TBuilder : IAzureClientFactoryBuilderWithConfiguration => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClientOptions.cs deleted file mode 100644 index 46696c34d723..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderClientOptions.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.ResourceManager.LargeHeader -{ - public partial class LargeHeaderClientOptions : ClientOptions - { - private const ServiceVersion LatestVersion = ServiceVersion.V2023_12_01_Preview; - - public LargeHeaderClientOptions(ServiceVersion version = LatestVersion) => throw null; - - public enum ServiceVersion - { - /// Preview API version 2023-12-01-preview. - V2023_12_01_Preview = 1 - } - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderModelFactory.cs deleted file mode 100644 index f4d65af5360f..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaderModelFactory.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.LargeHeader -{ - public static partial class LargeHeaderModelFactory - { - public static CancelResult CancelResult(bool succeeded = default) => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaders.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaders.cs deleted file mode 100644 index 9f0e2487f292..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/LargeHeaders.cs +++ /dev/null @@ -1,30 +0,0 @@ -// 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; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.LargeHeader -{ - public partial class LargeHeaders - { - protected LargeHeaders() => throw null; - - public virtual HttpPipeline Pipeline => throw null; - - public virtual Operation Two6k(WaitUntil waitUntil, string resourceGroupName, string largeHeaderName, RequestContext context) => throw null; - - public virtual Task> Two6kAsync(WaitUntil waitUntil, string resourceGroupName, string largeHeaderName, RequestContext context) => throw null; - - public virtual Operation Two6k(WaitUntil waitUntil, string resourceGroupName, string largeHeaderName, CancellationToken cancellationToken = default) => throw null; - - public virtual Task> Two6kAsync(WaitUntil waitUntil, string resourceGroupName, string largeHeaderName, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/Models/AzureResourceManagerLargeHeaderContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/Models/AzureResourceManagerLargeHeaderContext.cs deleted file mode 100644 index 306e3facabd5..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/src/Generated/Models/AzureResourceManagerLargeHeaderContext.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; - -namespace Azure.ResourceManager.LargeHeader -{ - public partial class AzureResourceManagerLargeHeaderContext : ModelReaderWriterContext - { - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/tspCodeModel.json deleted file mode 100644 index de4cf9d05635..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/tspCodeModel.json +++ /dev/null @@ -1,1069 +0,0 @@ -{ - "$id": "1", - "name": "Azure.ResourceManager.LargeHeader", - "apiVersions": [ - "2023-12-01-preview" - ], - "enums": [ - { - "$id": "2", - "kind": "enum", - "name": "ResourceProvisioningState", - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", - "valueType": { - "$id": "3", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "Succeeded", - "value": "Succeeded", - "valueType": { - "$id": "5", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "doc": "Resource has been created.", - "decorators": [] - }, - { - "$id": "6", - "kind": "enumvalue", - "name": "Failed", - "value": "Failed", - "valueType": { - "$id": "7", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "doc": "Resource creation failed.", - "decorators": [] - }, - { - "$id": "8", - "kind": "enumvalue", - "name": "Canceled", - "value": "Canceled", - "valueType": { - "$id": "9", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "2" - }, - "doc": "Resource creation was canceled.", - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager", - "doc": "The provisioning state of a resource type.", - "isFixed": false, - "isFlags": false, - "usage": "LroPolling", - "decorators": [] - }, - { - "$id": "10", - "kind": "enum", - "name": "Versions", - "crossLanguageDefinitionId": "Azure.ResourceManager.LargeHeader.Versions", - "valueType": { - "$id": "11", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "12", - "kind": "enumvalue", - "name": "v2023_12_01_preview", - "value": "2023-12-01-preview", - "valueType": { - "$id": "13", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "10" - }, - "doc": "Preview API version 2023-12-01-preview.", - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.LargeHeader", - "doc": "Azure API versions.", - "isFixed": true, - "isFlags": false, - "usage": "ApiVersionEnum", - "decorators": [] - } - ], - "constants": [ - { - "$id": "14", - "kind": "constant", - "name": "two6kContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "15", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "16", - "kind": "constant", - "name": "two6kContentType1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "17", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - } - ], - "models": [ - { - "$id": "18", - "kind": "model", - "name": "CancelResult", - "namespace": "Azure.ResourceManager.LargeHeader", - "crossLanguageDefinitionId": "Azure.ResourceManager.LargeHeader.CancelResult", - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [], - "properties": [ - { - "$id": "19", - "kind": "property", - "name": "succeeded", - "serializedName": "succeeded", - "type": { - "$id": "20", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.LargeHeader.CancelResult.succeeded", - "serializationOptions": { - "$id": "21", - "json": { - "$id": "22", - "name": "succeeded" - } - } - } - ] - }, - { - "$id": "23", - "kind": "model", - "name": "ErrorResponse", - "namespace": "Azure.ResourceManager.CommonTypes", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", - "usage": "Json,Exception", - "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", - "summary": "Error response", - "decorators": [], - "properties": [ - { - "$id": "24", - "kind": "property", - "name": "error", - "serializedName": "error", - "doc": "The error object.", - "type": { - "$id": "25", - "kind": "model", - "name": "ErrorDetail", - "namespace": "Azure.ResourceManager.CommonTypes", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", - "usage": "Json,Exception,LroPolling", - "doc": "The error detail.", - "decorators": [], - "properties": [ - { - "$id": "26", - "kind": "property", - "name": "code", - "serializedName": "code", - "doc": "The error code.", - "type": { - "$id": "27", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", - "serializationOptions": { - "$id": "28", - "json": { - "$id": "29", - "name": "code" - } - } - }, - { - "$id": "30", - "kind": "property", - "name": "message", - "serializedName": "message", - "doc": "The error message.", - "type": { - "$id": "31", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", - "serializationOptions": { - "$id": "32", - "json": { - "$id": "33", - "name": "message" - } - } - }, - { - "$id": "34", - "kind": "property", - "name": "target", - "serializedName": "target", - "doc": "The error target.", - "type": { - "$id": "35", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", - "serializationOptions": { - "$id": "36", - "json": { - "$id": "37", - "name": "target" - } - } - }, - { - "$id": "38", - "kind": "property", - "name": "details", - "serializedName": "details", - "doc": "The error details.", - "type": { - "$id": "39", - "kind": "array", - "name": "ArrayErrorDetail", - "valueType": { - "$ref": "25" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", - "serializationOptions": { - "$id": "40", - "json": { - "$id": "41", - "name": "details" - } - } - }, - { - "$id": "42", - "kind": "property", - "name": "additionalInfo", - "serializedName": "additionalInfo", - "doc": "The error additional info.", - "type": { - "$id": "43", - "kind": "array", - "name": "ArrayErrorAdditionalInfo", - "valueType": { - "$id": "44", - "kind": "model", - "name": "ErrorAdditionalInfo", - "namespace": "Azure.ResourceManager.CommonTypes", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", - "usage": "Json,Exception,LroPolling", - "doc": "The resource management error additional info.", - "decorators": [], - "properties": [ - { - "$id": "45", - "kind": "property", - "name": "type", - "serializedName": "type", - "doc": "The additional info type.", - "type": { - "$id": "46", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", - "serializationOptions": { - "$id": "47", - "json": { - "$id": "48", - "name": "type" - } - } - }, - { - "$id": "49", - "kind": "property", - "name": "info", - "serializedName": "info", - "doc": "The additional info.", - "type": { - "$id": "50", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", - "serializationOptions": { - "$id": "51", - "json": { - "$id": "52", - "name": "info" - } - } - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", - "serializationOptions": { - "$id": "53", - "json": { - "$id": "54", - "name": "additionalInfo" - } - } - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", - "serializationOptions": { - "$id": "55", - "json": { - "$id": "56", - "name": "error" - } - } - } - ] - }, - { - "$ref": "25" - }, - { - "$ref": "44" - }, - { - "$id": "57", - "kind": "model", - "name": "ArmOperationStatusResourceProvisioningState", - "namespace": "Azure.ResourceManager", - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", - "usage": "LroPolling", - "doc": "Standard Azure Resource Manager operation status response", - "decorators": [], - "properties": [ - { - "$id": "58", - "kind": "property", - "name": "status", - "serializedName": "status", - "doc": "The operation status", - "type": { - "$ref": "2" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", - "serializationOptions": { - "$id": "59", - "json": { - "$id": "60", - "name": "status" - } - } - }, - { - "$id": "61", - "kind": "path", - "name": "id", - "serializedName": "id", - "doc": "The unique identifier for the operationStatus resource", - "type": { - "$id": "62", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", - "explode": false, - "style": "simple", - "allowReserved": false, - "correspondingMethodParams": [] - }, - { - "$id": "63", - "kind": "property", - "name": "name", - "serializedName": "name", - "doc": "The name of the operationStatus resource", - "type": { - "$id": "64", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", - "serializationOptions": { - "$id": "65", - "json": { - "$id": "66", - "name": "name" - } - } - }, - { - "$id": "67", - "kind": "property", - "name": "startTime", - "serializedName": "startTime", - "doc": "Operation start time", - "type": { - "$id": "68", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "69", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", - "serializationOptions": { - "$id": "70", - "json": { - "$id": "71", - "name": "startTime" - } - } - }, - { - "$id": "72", - "kind": "property", - "name": "endTime", - "serializedName": "endTime", - "doc": "Operation complete time", - "type": { - "$id": "73", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "74", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", - "serializationOptions": { - "$id": "75", - "json": { - "$id": "76", - "name": "endTime" - } - } - }, - { - "$id": "77", - "kind": "property", - "name": "percentComplete", - "serializedName": "percentComplete", - "doc": "The progress made toward completing the operation", - "type": { - "$id": "78", - "kind": "float64", - "name": "float64", - "crossLanguageDefinitionId": "TypeSpec.float64", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", - "serializationOptions": { - "$id": "79", - "json": { - "$id": "80", - "name": "percentComplete" - } - } - }, - { - "$id": "81", - "kind": "property", - "name": "error", - "serializedName": "error", - "doc": "Errors that occurred if the operation ended with Canceled or Failed status", - "type": { - "$ref": "25" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", - "serializationOptions": { - "$id": "82", - "json": { - "$id": "83", - "name": "error" - } - } - } - ] - } - ], - "clients": [ - { - "$id": "84", - "kind": "client", - "name": "LargeHeaderClient", - "namespace": "Azure.ResourceManager.LargeHeader", - "doc": "Arm Resource Provider management API.", - "methods": [], - "parameters": [ - { - "$id": "85", - "name": "endpoint", - "nameInRequest": "endpoint", - "doc": "Service host", - "type": { - "$id": "86", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "location": "Uri", - "isApiVersion": false, - "isContentType": false, - "isRequired": true, - "isEndpoint": true, - "skipUrlEncoding": false, - "explode": false, - "kind": "Client", - "defaultValue": { - "$id": "87", - "type": { - "$id": "88", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}" - } - ], - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.LargeHeader", - "apiVersions": [ - "2023-12-01-preview" - ], - "children": [ - { - "$id": "89", - "kind": "client", - "name": "LargeHeaders", - "namespace": "Azure.ResourceManager.LargeHeader", - "methods": [ - { - "$id": "90", - "kind": "lro", - "name": "two6k", - "accessibility": "public", - "apiVersions": [ - "2023-12-01-preview" - ], - "doc": "A long-running resource action.", - "operation": { - "$id": "91", - "name": "two6k", - "resourceName": "LargeHeaders", - "doc": "A long-running resource action.", - "accessibility": "public", - "parameters": [ - { - "$id": "92", - "name": "apiVersion", - "nameInRequest": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "93", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Query", - "isApiVersion": true, - "isContentType": false, - "isEndpoint": false, - "explode": false, - "isRequired": true, - "kind": "Client", - "defaultValue": { - "$id": "94", - "type": { - "$id": "95", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-12-01-preview" - }, - "decorators": [], - "skipUrlEncoding": false - }, - { - "$id": "96", - "name": "subscriptionId", - "nameInRequest": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "97", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "98", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "isContentType": false, - "isEndpoint": false, - "explode": false, - "isRequired": true, - "kind": "Client", - "decorators": [], - "skipUrlEncoding": false - }, - { - "$id": "99", - "name": "resourceGroupName", - "nameInRequest": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "isContentType": false, - "isEndpoint": false, - "explode": false, - "isRequired": true, - "kind": "Method", - "decorators": [], - "skipUrlEncoding": false - }, - { - "$id": "101", - "name": "largeHeaderName", - "nameInRequest": "largeHeaderName", - "doc": "The name of the LargeHeader", - "type": { - "$id": "102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "isContentType": false, - "isEndpoint": false, - "explode": false, - "isRequired": true, - "kind": "Method", - "decorators": [], - "skipUrlEncoding": false - }, - { - "$id": "103", - "name": "accept", - "nameInRequest": "Accept", - "type": { - "$ref": "14" - }, - "location": "Header", - "isApiVersion": false, - "isContentType": false, - "isEndpoint": false, - "explode": false, - "isRequired": true, - "kind": "Constant", - "decorators": [], - "skipUrlEncoding": false - } - ], - "responses": [ - { - "$id": "104", - "statusCodes": [ - 202 - ], - "headers": [ - { - "$id": "105", - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$id": "106", - "kind": "url", - "name": "ResourceLocation", - "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", - "baseType": { - "$id": "107", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "decorators": [] - } - }, - { - "$id": "108", - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "109", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "$id": "110", - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "111", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - }, - { - "$id": "112", - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "18" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.LargeHeader/largeHeaders/{largeHeaderName}/two6k", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Azure.ResourceManager.LargeHeader.LargeHeaders.two6k", - "decorators": [] - }, - "parameters": [ - { - "$id": "113", - "name": "resourceGroupName", - "nameInRequest": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "114", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "isContentType": false, - "isEndpoint": false, - "explode": false, - "isRequired": true, - "kind": "Method", - "decorators": [], - "skipUrlEncoding": false - }, - { - "$id": "115", - "name": "largeHeaderName", - "nameInRequest": "largeHeaderName", - "doc": "The name of the LargeHeader", - "type": { - "$id": "116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "isContentType": false, - "isEndpoint": false, - "explode": false, - "isRequired": true, - "kind": "Method", - "decorators": [], - "skipUrlEncoding": false - }, - { - "$id": "117", - "name": "accept", - "nameInRequest": "accept", - "type": { - "$ref": "16" - }, - "location": "Header", - "isApiVersion": false, - "isContentType": false, - "isEndpoint": false, - "explode": false, - "isRequired": true, - "kind": "Constant", - "decorators": [], - "skipUrlEncoding": false - } - ], - "response": { - "$id": "118", - "type": { - "$ref": "18" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Azure.ResourceManager.LargeHeader.LargeHeaders.two6k", - "lroMetadata": { - "$id": "119", - "finalStateVia": 1, - "finalResponse": { - "$id": "120", - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "18" - } - } - } - } - ], - "parameters": [ - { - "$id": "121", - "name": "endpoint", - "nameInRequest": "endpoint", - "doc": "Service host", - "type": { - "$id": "122", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "location": "Uri", - "isApiVersion": false, - "isContentType": false, - "isRequired": true, - "isEndpoint": true, - "skipUrlEncoding": false, - "explode": false, - "kind": "Client", - "defaultValue": { - "$id": "123", - "type": { - "$id": "124", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}" - } - ], - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.LargeHeader.LargeHeaders", - "apiVersions": [ - "2023-12-01-preview" - ], - "parent": { - "$ref": "84" - } - } - ] - } - ], - "auth": { - "$id": "125", - "oAuth2": { - "$id": "126", - "scopes": [ - "user_impersonation" - ] - } - } -} diff --git a/eng/packages/http-client-csharp/package-lock.json b/eng/packages/http-client-csharp/package-lock.json index b18ccec07abb..3ee842a7b687 100644 --- a/eng/packages/http-client-csharp/package-lock.json +++ b/eng/packages/http-client-csharp/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250624.1" + "@typespec/http-client-csharp": "1.0.0-alpha.20250625.1" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.19", @@ -2503,9 +2503,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250624.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250624.1.tgz", - "integrity": "sha512-6VvNTbQsASv8hJMU4GliUl6bpLEUuqAd2cQJazxhjQQZhtpMmwYxlfOKJ9DJhzsjXshyLrQu8WJLKfD5V7FByQ==", + "version": "1.0.0-alpha.20250625.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250625.1.tgz", + "integrity": "sha512-tvtFsr2cyDFfxTiKENMx17IEkzziUoSkuC2ebArYKWyz5JeFDI9Hr0byunhhtDs/yBlZF4LoKZPQMw4wK9Yo6w==", "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" diff --git a/eng/packages/http-client-csharp/package.json b/eng/packages/http-client-csharp/package.json index d4e0bbd05fe3..a8c8b65e6117 100644 --- a/eng/packages/http-client-csharp/package.json +++ b/eng/packages/http-client-csharp/package.json @@ -38,7 +38,7 @@ "dist/generator/**" ], "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250624.1" + "@typespec/http-client-csharp": "1.0.0-alpha.20250625.1" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.19", diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/Azure.ResourceManager.AgriculturePlatform.sln b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/Azure.ResourceManager.AgriculturePlatform.sln index c5d9f5f16ec0..ff43d50440cc 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/Azure.ResourceManager.AgriculturePlatform.sln +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/Azure.ResourceManager.AgriculturePlatform.sln @@ -7,8 +7,6 @@ Project("{1EF4A380-C4BD-4259-A8EA-9489EDA8F220}") = "Azure.ResourceManager.Agric EndProject Project("{1EF4A380-C4BD-4259-A8EA-9489EDA8F220}") = "Azure.ResourceManager.AgriculturePlatform.Tests", "tests\Azure.ResourceManager.AgriculturePlatform.Tests.csproj", "{69207EE6-C513-4C3E-B4F1-3C54513BC194}" EndProject -Project("{1EF4A380-C4BD-4259-A8EA-9489EDA8F220}") = "Azure.ResourceManager.AgriculturePlatform.Samples", "samples\Azure.ResourceManager.AgriculturePlatform.Samples.csproj", "{D13A90DB-89BD-4F64-9C2C-43A1C6C50AFF}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Azure.ResourceManager.AgriculturePlatform.Samples.csproj b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Azure.ResourceManager.AgriculturePlatform.Samples.csproj deleted file mode 100644 index 2a0d3739740c..000000000000 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Azure.ResourceManager.AgriculturePlatform.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Generated/Samples/Sample_AgricultureServiceCollection.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tests/Generated/Samples/Sample_AgricultureServiceCollection.cs similarity index 100% rename from sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Generated/Samples/Sample_AgricultureServiceCollection.cs rename to sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tests/Generated/Samples/Sample_AgricultureServiceCollection.cs diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Generated/Samples/Sample_AgricultureServiceResource.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tests/Generated/Samples/Sample_AgricultureServiceResource.cs similarity index 100% rename from sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Generated/Samples/Sample_AgricultureServiceResource.cs rename to sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tests/Generated/Samples/Sample_AgricultureServiceResource.cs diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md b/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md index 71e9f44cec3b..0812e33ef2d0 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md +++ b/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md @@ -4,7 +4,8 @@ ### Features Added -- Tracing for Agents +- Tracing for Agents. More information [here](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/README.md#tracing). +- Convenience constructor for BingCustomSearchToolParameters ### Breaking Changes @@ -14,7 +15,11 @@ ### Sample updates - The Azure function sample was simplified. -- Added samples for file search citation with streaming. +- Added samples for file search citation with streaming. +- Fabric tool sample added +- Connected Agent tool sample added +- Multiple Connected Agent sample added. +- Bing Custom Search sample added. ## 1.1.0-beta.2 (2025-06-04) diff --git a/sdk/ai/Azure.AI.Agents.Persistent/README.md b/sdk/ai/Azure.AI.Agents.Persistent/README.md index 5600d16fe27e..628cc532f670 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/README.md +++ b/sdk/ai/Azure.AI.Agents.Persistent/README.md @@ -32,7 +32,8 @@ managing search indexes, evaluating generative AI performance, and enabling Open - [Code interpreter attachment](#create-message-with-code-interpreter-attachment) - [Create Agent with Bing Grounding](#create-agent-with-bing-grounding) - [Azure AI Search](#create-agent-with-azure-ai-search) - - [Function call](#function-call) + - [Function call Executed Manually](#function-call-executed-manually) + - [Function call Executed Automatically](#function-call-executed-automatically) - [Azure function Call](#azure-function-call) - [OpenAPI](#create-agent-with-openapi) - [Tracing](#tracing) @@ -419,7 +420,7 @@ await foreach (PersistentThreadMessage threadMessage in messages) } ``` -#### Function call +#### Function call executed manually Tools that reference caller-defined capabilities as functions can be provided to an agent to allow it to dynamically resolve and disambiguate during a run. @@ -644,6 +645,63 @@ do while (toolOutputs.Count > 0); ``` +#### Function call executed automatically + +In addition to the manual function calls, SDK supports automatic function calling. After creating functions and`FunctionToolDefinition` according to the last section, here is the steps: + +When you create an agent, you can specify the function call by tools argument similar to the example of manual function calls: +```C# Snippet:StreamingWithAutoFunctionCall_CreateAgent +PersistentAgent agent = client.Administration.CreateAgent( + model: modelDeploymentName, + name: "SDK Test Agent - Functions", + instructions: "You are a weather bot. Use the provided functions to help answer questions. " + + "Customize your responses to the user's preferences as much as possible and use friendly " + + "nicknames for cities whenever possible.", + tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] +); +``` + +We create a thread and message similar to the example of manual function tool calls: +```C# Snippet:StreamingWithAutoFunctionCall_CreateThreadMessage +PersistentAgentThread thread = client.Threads.CreateThread(); + +PersistentThreadMessage message = client.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "What's the weather like in my favorite city?"); +``` + +Setup `AutoFunctionCallOptions`: +```C# Snippet:StreamingWithAutoFunctionCall_EnableAutoFunctionCalls +List toolOutputs = new(); +Dictionary toolDelegates = new(); +toolDelegates.Add(nameof(GetWeatherAtLocation), GetWeatherAtLocation); +toolDelegates.Add(nameof(GetCityNickname), GetCityNickname); +toolDelegates.Add(nameof(GetUserFavoriteCity), GetUserFavoriteCity); +AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 10); +``` + +With autoFunctionCallOptions as parameter for `CreateRunStreamingAsync`, the agent will then call the function automatically when it is needed: +```C# Snippet:StreamingWithAutoFunctionCallAsync +await foreach (StreamingUpdate streamingUpdate in client.Runs.CreateRunStreamingAsync(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions)) +{ + if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) + { + Console.WriteLine("--- Run started! ---"); + } + else if (streamingUpdate is MessageContentUpdate contentUpdate) + { + Console.Write(contentUpdate.Text); + } + else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) + { + Console.WriteLine(); + Console.WriteLine("--- Run completed! ---"); + } +} +``` +To allow the agent cast the parameters to the function call, you must use the supported argument types. They are `string`, `int`, `ushort`, `float`, `uint`, `decimal`, `double`, `long`, and `bool`. Other tpes such as array, dictionary, or classes are not supported. + #### Azure function call We can use Azure Function from inside the agent. In the example below we are calling function "foo", which responds "Bar". In this example we create `AzureFunctionToolDefinition` object, with the function name, description, input and output queues, followed by function parameters. See below for the instructions on function deployment. @@ -885,7 +943,7 @@ AppContext.SetSwitch("Azure.Experimental.TraceGenAIMessageContent", false); ``` Set the value to `true` to enable content recording. -##### Tracing to Azure Montior +##### Tracing to Azure Monitor First, set the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable to point to your Azure Monitor resource. For tracing to Azure Monitor from your application, the preferred option is to use Azure.Monitor.OpenTelemetry.AspNetCore. Install the package with [NuGet](https://www.nuget.org/ ): diff --git a/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs b/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs index fee03fc84fa8..efab4fe60457 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs @@ -16,6 +16,10 @@ 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 AutoFunctionCallOptions + { + public AutoFunctionCallOptions(System.Collections.Generic.Dictionary toolDelegates, int maxRetry) { } + } public partial class AzureAIAgentsPersistentContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureAIAgentsPersistentContext() { } @@ -151,6 +155,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class BingCustomSearchToolParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BingCustomSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations) { } + public BingCustomSearchToolParameters(string connectionId, string instanceName) { } public System.Collections.Generic.IList SearchConfigurations { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Agents.Persistent.BingCustomSearchToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2435,9 +2440,11 @@ protected ThreadRuns() { } public virtual System.Threading.Tasks.Task> CreateRunAsync(Azure.AI.Agents.Persistent.PersistentAgentThread thread, Azure.AI.Agents.Persistent.PersistentAgent agent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateRunAsync(string threadId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable include = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string agentId, System.Collections.Generic.IEnumerable include, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string agentId, Azure.AI.Agents.Persistent.AutoFunctionCallOptions autoFunctionCallOptions, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string agentId, System.Collections.Generic.IEnumerable include, Azure.AI.Agents.Persistent.AutoFunctionCallOptions autoFunctionCallOptions = null, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string agentId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, System.Collections.Generic.IEnumerable include, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, Azure.AI.Agents.Persistent.AutoFunctionCallOptions autoFunctionCallOptions, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, System.Collections.Generic.IEnumerable include, Azure.AI.Agents.Persistent.AutoFunctionCallOptions autoFunctionCallOptions = null, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetRun(string threadId, string runId, Azure.RequestContext context) { throw null; } public virtual Azure.Response GetRun(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs b/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs index d34c42b9eab7..881eb31a5d84 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs @@ -16,6 +16,10 @@ 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 AutoFunctionCallOptions + { + public AutoFunctionCallOptions(System.Collections.Generic.Dictionary toolDelegates, int maxRetry) { } + } public partial class AzureAIAgentsPersistentContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureAIAgentsPersistentContext() { } @@ -151,6 +155,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class BingCustomSearchToolParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BingCustomSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations) { } + public BingCustomSearchToolParameters(string connectionId, string instanceName) { } public System.Collections.Generic.IList SearchConfigurations { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Agents.Persistent.BingCustomSearchToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2435,9 +2440,11 @@ protected ThreadRuns() { } public virtual System.Threading.Tasks.Task> CreateRunAsync(Azure.AI.Agents.Persistent.PersistentAgentThread thread, Azure.AI.Agents.Persistent.PersistentAgent agent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateRunAsync(string threadId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable include = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string agentId, System.Collections.Generic.IEnumerable include, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string agentId, Azure.AI.Agents.Persistent.AutoFunctionCallOptions autoFunctionCallOptions, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string agentId, System.Collections.Generic.IEnumerable include, Azure.AI.Agents.Persistent.AutoFunctionCallOptions autoFunctionCallOptions = null, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string agentId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, System.Collections.Generic.IEnumerable include, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, Azure.AI.Agents.Persistent.AutoFunctionCallOptions autoFunctionCallOptions, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, System.Collections.Generic.IEnumerable include, Azure.AI.Agents.Persistent.AutoFunctionCallOptions autoFunctionCallOptions = null, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Agents.Persistent.Truncation truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetRun(string threadId, string runId, Azure.RequestContext context) { throw null; } public virtual Azure.Response GetRun(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/assets.json b/sdk/ai/Azure.AI.Agents.Persistent/assets.json index f8256e61ad1b..c32106030257 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/assets.json +++ b/sdk/ai/Azure.AI.Agents.Persistent/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/ai/Azure.AI.Agents.Persistent", - "Tag": "net/ai/Azure.AI.Agents.Persistent_2b964340aa" + "Tag": "net/ai/Azure.AI.Agents.Persistent_f7ce2c53dc" } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample24_PersistentAgents_Multiple_Connected_Agents.md b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample24_PersistentAgents_Multiple_Connected_Agents.md new file mode 100644 index 000000000000..d1a945f2ec5a --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample24_PersistentAgents_Multiple_Connected_Agents.md @@ -0,0 +1,202 @@ +# Sample for use of an agent with multiple connected agent tools in Azure.AI.Agents.Persistent. + +To enable your Agent to use multiple other agents as tools (sub-agents), you use multiple `ConnectedAgentToolDefinition` instances, each with their own connected agent details. +1. First we need to create an agent client and read the environment variables, which will be used in the next steps. + +```C# Snippet:AgentsMultipleConnectedAgents_CreateProject +var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential()); +``` + +2. We will create multiple sub-agents first that will be used as connected agent tools. + +Synchronous sample: +```C# Snippet:AgentsMultipleConnectedAgents_CreateSubAgents +PersistentAgent stockPriceAgent = agentClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "stock-price-bot", + instructions: "Your job is to get the stock price of a company. If asked for the Microsoft stock price, always return $350."); + +PersistentAgent weatherAgent = agentClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "weather-bot", + instructions: "Your job is to get the weather for a given location. If asked for the weather in Seattle, always return 60 degrees and cloudy."); +``` + +Asynchronous sample: +```C# Snippet:AgentsMultipleConnectedAgentsAsync_CreateSubAgents +PersistentAgent stockPriceAgent = await agentClient.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "stock-price-bot", + instructions: "Your job is to get the stock price of a company. If asked for the Microsoft stock price, always return $350."); + +PersistentAgent weatherAgent = await agentClient.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "weather-bot", + instructions: "Your job is to get the weather for a given location. If asked for the weather in Seattle, always return 60 degrees and cloudy."); +``` + +3. We will use the sub-agents details to initialize multiple `ConnectedAgentToolDefinition` instances. + +```C# Snippet:AgentsMultipleConnectedAgents_GetConnectedAgents +ConnectedAgentToolDefinition stockPriceConnectedAgentTool = new( + new ConnectedAgentDetails( + id: stockPriceAgent.Id, + name: "stock_price_bot", + description: "Gets the stock price of a company" + ) +); + +ConnectedAgentToolDefinition weatherConnectedAgentTool = new( + new ConnectedAgentDetails( + id: weatherAgent.Id, + name: "weather_bot", + description: "Gets the weather for a given location" + ) +); +``` + +4. We will use both `ConnectedAgentToolDefinition` instances during the main agent initialization. + +Synchronous sample: +```C# Snippet:AgentsMultipleConnectedAgents_CreateAgent +PersistentAgent agent = agentClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "my-assistant", + instructions: "You are a helpful assistant, and use the connected agents to get stock prices and weather.", + tools: [stockPriceConnectedAgentTool, weatherConnectedAgentTool]); +``` + +Asynchronous sample: +```C# Snippet:AgentsMultipleConnectedAgentsAsync_CreateAgent +PersistentAgent agent = await agentClient.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "my-assistant", + instructions: "You are a helpful assistant, and use the connected agents to get stock prices and weather.", + tools: [stockPriceConnectedAgentTool, weatherConnectedAgentTool]); +``` + +5. Now we will create the thread, add the message containing a question for agent and start the run. + +Synchronous sample: +```C# Snippet:AgentsMultipleConnectedAgents_CreateThreadMessage +PersistentAgentThread thread = agentClient.Threads.CreateThread(); + +// Create message to thread +PersistentThreadMessage message = agentClient.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "What is the stock price of Microsoft and the weather in Seattle?"); + +// Run the agent +ThreadRun run = agentClient.Runs.CreateRun(thread, agent); +do +{ + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = agentClient.Runs.GetRun(thread.Id, run.Id); +} +while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + +Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); +``` + +Asynchronous sample: +```C# Snippet:AgentsMultipleConnectedAgentsAsync_CreateThreadMessage +PersistentAgentThread thread = await agentClient.Threads.CreateThreadAsync(); + +// Create message to thread +PersistentThreadMessage message = await agentClient.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "What is the stock price of Microsoft and the weather in Seattle?"); + +// Run the agent +ThreadRun run = await agentClient.Runs.CreateRunAsync(thread, agent); +do +{ + await Task.Delay(TimeSpan.FromMilliseconds(500)); + run = await agentClient.Runs.GetRunAsync(thread.Id, run.Id); +} +while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + +Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); +``` + +6. Print the agent messages to console in chronological order. + +Synchronous sample: +```C# Snippet:AgentsMultipleConnectedAgents_Print +Pageable messages = agentClient.Messages.GetMessages( + threadId: thread.Id, + order: ListSortOrder.Ascending +); + +foreach (PersistentThreadMessage threadMessage in messages) +{ + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + Console.Write(textItem.Text); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($""); + } + Console.WriteLine(); + } +} +``` + +Asynchronous sample: +```C# Snippet:AgentsMultipleConnectedAgentsAsync_Print +AsyncPageable messages = agentClient.Messages.GetMessagesAsync( + threadId: thread.Id, + order: ListSortOrder.Ascending +); + +await foreach (PersistentThreadMessage threadMessage in messages) +{ + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + Console.Write(textItem.Text); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($""); + } + Console.WriteLine(); + } +} +``` + +7. Clean up resources by deleting thread, main agent, and all sub-agents. + +Synchronous sample: +```C# Snippet:AgentsMultipleConnectedAgentsCleanup +agentClient.Threads.DeleteThread(threadId: thread.Id); +agentClient.Administration.DeleteAgent(agentId: agent.Id); +agentClient.Administration.DeleteAgent(agentId: stockPriceAgent.Id); +agentClient.Administration.DeleteAgent(agentId: weatherAgent.Id); +``` + +Asynchronous sample: +```C# Snippet:AgentsMultipleConnectedAgentsCleanupAsync +await agentClient.Threads.DeleteThreadAsync(threadId: thread.Id); +await agentClient.Administration.DeleteAgentAsync(agentId: agent.Id); +await agentClient.Administration.DeleteAgentAsync(agentId: stockPriceAgent.Id); +await agentClient.Administration.DeleteAgentAsync(agentId: weatherAgent.Id); +``` diff --git a/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample24_Streaming_with_Auto_Function_Calls.md b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample24_Streaming_with_Auto_Function_Calls.md new file mode 100644 index 000000000000..ead95be448bc --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample24_Streaming_with_Auto_Function_Calls.md @@ -0,0 +1,185 @@ +# Sample using agents streaming with auto function calls in Azure.AI.Projects. + +We demonstrated how to write code to call local functions with the agents in streaming scenarios in a previous example. In this example, we will demonstrate how to configure calling local functions automatically. + +1. First we need to create agent client and read the environment variables that will be used in the next steps. +```C# Snippet:StreamingWithAutoFunctionCall_CreateClient +var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential()); +``` + +2 Define three toy functions: `GetUserFavoriteCity`that always returns "Seattle, WA" and `GetCityNickname`, which will handle only "Seattle, WA" and will throw exception in response to other city names. The last function `GetWeatherAtLocation` returns weather at Seattle, WA. For each function we need to create `FunctionToolDefinition`, which defines function name, description and parameters. +```C# Snippet:StreamingWithAutoFunctionCall_DefineFunctionTools +// Example of a function that defines no parameters +private string GetUserFavoriteCity() => "Seattle, WA"; +private FunctionToolDefinition getUserFavoriteCityTool = new("GetUserFavoriteCity", "Gets the user's favorite city."); +// Example of a function with a single required parameter +private string GetCityNickname(string location) => location switch +{ + "Seattle, WA" => "The Emerald City", + _ => throw new NotImplementedException(), +}; +private FunctionToolDefinition getCityNicknameTool = new( + name: "GetCityNickname", + description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", + parameters: BinaryData.FromObjectAsJson( + new + { + Type = "object", + Properties = new + { + Location = new + { + Type = "string", + Description = "The city and state, e.g. San Francisco, CA", + }, + }, + Required = new[] { "location" }, + }, + new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); +// Example of a function with one required and one optional, enum parameter +private string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch +{ + "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", + _ => throw new NotImplementedException() +}; +private FunctionToolDefinition getCurrentWeatherAtLocationTool = new( + name: "GetWeatherAtLocation", + description: "Gets the current weather at a provided location.", + parameters: BinaryData.FromObjectAsJson( + new + { + Type = "object", + Properties = new + { + Location = new + { + Type = "string", + Description = "The city and state, e.g. San Francisco, CA", + }, + Unit = new + { + Type = "string", + Enum = new[] { "c", "f" }, + }, + }, + Required = new[] { "location" }, + }, + new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); +``` + +3. Create Agent with the `FunctionToolDefinitions`. + +Synchronous sample: +```C# Snippet:StreamingWithAutoFunctionCall_CreateAgent +PersistentAgent agent = client.Administration.CreateAgent( + model: modelDeploymentName, + name: "SDK Test Agent - Functions", + instructions: "You are a weather bot. Use the provided functions to help answer questions. " + + "Customize your responses to the user's preferences as much as possible and use friendly " + + "nicknames for cities whenever possible.", + tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] +); +``` + +Asynchronous sample: +```C# Snippet:StreamingWithAutoFunctionCallAsync_CreateAgent +PersistentAgent agent = await client.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "SDK Test Agent - Functions", + instructions: "You are a weather bot. Use the provided functions to help answer questions. " + + "Customize your responses to the user's preferences as much as possible and use friendly " + + "nicknames for cities whenever possible.", + tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] +); +``` + +4. Create `Thread` with the message. + +Synchronous sample: +```C# Snippet:StreamingWithAutoFunctionCall_CreateThreadMessage +PersistentAgentThread thread = client.Threads.CreateThread(); + +PersistentThreadMessage message = client.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "What's the weather like in my favorite city?"); +``` + +Asynchronous sample: +```C# Snippet:StreamingWithAutoFunctionCallAsync_CreateThreadMessage +PersistentAgentThread thread = await client.Threads.CreateThreadAsync(); + +PersistentThreadMessage message = await client.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "What's the weather like in my favorite city?"); +``` + +5. Setup `AutoFunctionCallOptions` with the function delegates above. +```C# Snippet:StreamingWithAutoFunctionCall_EnableAutoFunctionCalls +List toolOutputs = new(); +Dictionary toolDelegates = new(); +toolDelegates.Add(nameof(GetWeatherAtLocation), GetWeatherAtLocation); +toolDelegates.Add(nameof(GetCityNickname), GetCityNickname); +toolDelegates.Add(nameof(GetUserFavoriteCity), GetUserFavoriteCity); +AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 10); +``` + +6. Create a stream that will allow us to receive updates from the agent. With `autoFunctionCallOptions` as parameter, the functions will be called automatically when the agent needs to call them. The `StreamingUpdate` object will contain the results of the function calls. + +Synchronous sample: +```C# Snippet:StreamingWithAutoFunctionCall +CollectionResult stream = client.Runs.CreateRunStreaming(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions); +foreach (StreamingUpdate streamingUpdate in stream) +{ + if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) + { + Console.WriteLine("--- Run started! ---"); + } + else if (streamingUpdate is MessageContentUpdate contentUpdate) + { + Console.Write(contentUpdate.Text); + } + else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) + { + Console.WriteLine(); + Console.WriteLine("--- Run completed! ---"); + } +} +``` + +Asynchronous sample: +```C# Snippet:StreamingWithAutoFunctionCallAsync +await foreach (StreamingUpdate streamingUpdate in client.Runs.CreateRunStreamingAsync(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions)) +{ + if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) + { + Console.WriteLine("--- Run started! ---"); + } + else if (streamingUpdate is MessageContentUpdate contentUpdate) + { + Console.Write(contentUpdate.Text); + } + else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) + { + Console.WriteLine(); + Console.WriteLine("--- Run completed! ---"); + } +} +``` + +7. Finally, we delete all the resources, we have created in this sample. + +Synchronous sample: +```C# Snippet:StreamingWithAutoFunctionCall_Cleanup +client.Threads.DeleteThread(thread.Id); +client.Administration.DeleteAgent(agent.Id); +``` + +Asynchronous sample: +```C# Snippet:StreamingWithAutoFunctionCallAsync_Cleanup +await client.Threads.DeleteThreadAsync(thread.Id); +await client.Administration.DeleteAgentAsync(agent.Id); +``` diff --git a/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample25_PersistentAgents_Bing_Custom_Search.md b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample25_PersistentAgents_Bing_Custom_Search.md new file mode 100644 index 000000000000..594d70f356d5 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample25_PersistentAgents_Bing_Custom_Search.md @@ -0,0 +1,181 @@ +# Sample for use of an agent with Bing custom search in Azure.AI.Agents.Persistent. + +To enable your Agent to perform search through Bing Custom Search API, you use `BingCustomSearchToolDefinition` along with a connection and custom search instance. +1. First we need to create an agent client and read the environment variables, which will be used in the next steps. + +```C# Snippet:AgentsBingCustomSearch_CreateProject +var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +var connectionId = System.Environment.GetEnvironmentVariable("BING_CUSTOM_CONNECTION_ID"); +PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential()); +``` + +2. We will use the Bing Custom Search connection ID and instance name to initialize the `BingCustomSearchToolDefinition`. + +```C# Snippet:AgentsBingCustomSearch_GetConnection +BingCustomSearchToolDefinition bingCustomSearchTool = new( + new BingCustomSearchToolParameters(connectionId, "your_config_instance_name") // Replace with your actual configuration instance name +); +``` + +3. We will use the `BingCustomSearchToolDefinition` during the agent initialization. + +Synchronous sample: +```C# Snippet:AgentsBingCustomSearch_CreateAgent +PersistentAgent agent = agentClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "my-agent", + instructions: "You are a helpful agent.", + tools: [bingCustomSearchTool]); +``` + +Asynchronous sample: +```C# Snippet:AgentsBingCustomSearchAsync_CreateAgent +PersistentAgent agent = await agentClient.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "my-agent", + instructions: "You are a helpful agent.", + tools: [ bingCustomSearchTool ]); +``` + +4. Now we will create the thread, add the message containing a question for agent and start the run. + +Synchronous sample: +```C# Snippet:AgentsBingCustomSearch_CreateThreadMessage +PersistentAgentThread thread = agentClient.Threads.CreateThread(); + +// Create message to thread +PersistentThreadMessage message = agentClient.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "How many medals did the USA win in the 2024 summer olympics?"); + +// Run the agent +ThreadRun run = agentClient.Runs.CreateRun(thread, agent); +do +{ + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = agentClient.Runs.GetRun(thread.Id, run.Id); +} +while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + +Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); +``` + +Asynchronous sample: +```C# Snippet:AgentsBingCustomSearchAsync_CreateThreadMessage +PersistentAgentThread thread = await agentClient.Threads.CreateThreadAsync(); + +// Create message to thread +PersistentThreadMessage message = await agentClient.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "How many medals did the USA win in the 2024 summer olympics?"); + +// Run the agent +ThreadRun run = await agentClient.Runs.CreateRunAsync(thread, agent); +do +{ + await Task.Delay(TimeSpan.FromMilliseconds(500)); + run = await agentClient.Runs.GetRunAsync(thread.Id, run.Id); +} +while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + +Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); +``` + +5. Print the agent messages to console in chronological order. + +Synchronous sample: +```C# Snippet:AgentsBingCustomSearch_Print +Pageable messages = agentClient.Messages.GetMessages( + threadId: thread.Id, + order: ListSortOrder.Ascending +); + +foreach (PersistentThreadMessage threadMessage in messages) +{ + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + string response = textItem.Text; + if (textItem.Annotations != null) + { + foreach (MessageTextAnnotation annotation in textItem.Annotations) + { + if (annotation is MessageTextUriCitationAnnotation uriAnnotation) + { + response = response.Replace(uriAnnotation.Text, $" [{uriAnnotation.UriCitation.Title}]({uriAnnotation.UriCitation.Uri})"); + } + } + } + Console.Write($"Agent response: {response}"); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($""); + } + Console.WriteLine(); + } +} +``` + +Asynchronous sample: +```C# Snippet:AgentsBingCustomSearchAsync_Print +AsyncPageable messages = agentClient.Messages.GetMessagesAsync( + threadId: thread.Id, + order: ListSortOrder.Ascending +); + +await foreach (PersistentThreadMessage threadMessage in messages) +{ + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + string response = textItem.Text; + if (textItem.Annotations != null) + { + foreach (MessageTextAnnotation annotation in textItem.Annotations) + { + if (annotation is MessageTextUriCitationAnnotation uriAnnotation) + { + response = response.Replace(uriAnnotation.Text, $" [{uriAnnotation.UriCitation.Title}]({uriAnnotation.UriCitation.Uri})"); + } + } + } + Console.Write($"Agent response: {response}"); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($""); + } + Console.WriteLine(); + } +} +``` + +6. Clean up resources by deleting thread and agent. + +Synchronous sample: +```C# Snippet:AgentsBingCustomSearchCleanup +agentClient.Threads.DeleteThread(threadId: thread.Id); +agentClient.Administration.DeleteAgent(agentId: agent.Id); +``` + +Asynchronous sample: +```C# Snippet:AgentsBingCustomSearchCleanupAsync +await agentClient.Threads.DeleteThreadAsync(threadId: thread.Id); +await agentClient.Administration.DeleteAgentAsync(agentId: agent.Id); +``` diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/AutoFunctionCallOptions.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/AutoFunctionCallOptions.cs new file mode 100644 index 000000000000..6c0ec80a4259 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/AutoFunctionCallOptions.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; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Azure.AI.Agents.Persistent +{ + public class AutoFunctionCallOptions + { + private Dictionary _autoFunctionCallDelegates = new(); + private int _maxRetry; + /// The size of the client cache. + + /// + /// Enables auto tool calls to be executed automatically during streaming. If this is not set, function must be called manually. + /// + /// Dictionary in name and delegate in pair + /// Maximum number of errors allowed and retry per stream. Default value is 10. + public AutoFunctionCallOptions(Dictionary toolDelegates, int maxRetry) { + ValidateAutoFunctions(toolDelegates); + _autoFunctionCallDelegates.Clear(); + + foreach (var kvp in toolDelegates) + { + _autoFunctionCallDelegates[kvp.Key] = kvp.Value; + } + _maxRetry = maxRetry; + } + + private void ValidateAutoFunctions(Dictionary toolDelegates) + { + if (toolDelegates == null || toolDelegates.Count == 0) + { + throw new InvalidOperationException("The delegate dictionary must have at least one delegate."); + } + foreach (var kvp in toolDelegates) + { + if (kvp.Value.Method.ReturnType != typeof(string)) + { + throw new InvalidOperationException($"The Delegates must have string as return type."); + } + } + } + + internal Dictionary AutoFunctionCallDelegates => _autoFunctionCallDelegates; + + internal int MaxRetry => _maxRetry; + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/BingCustomSearchToolParameters.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/BingCustomSearchToolParameters.cs new file mode 100644 index 000000000000..60b0202f9281 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/BingCustomSearchToolParameters.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; + +namespace Azure.AI.Agents.Persistent +{ + public partial class BingCustomSearchToolParameters + { + public BingCustomSearchToolParameters( string connectionId, string instanceName ) + { + // Additional initialization logic if needed + var bingCustomSearchConfiguration = new BingCustomSearchConfiguration + { + ConnectionId = connectionId, + InstanceName = instanceName + }; + + this.SearchConfigurations = new List { bingCustomSearchConfiguration }; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/Streaming/AsyncStreamingUpdateCollection.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/Streaming/AsyncStreamingUpdateCollection.cs index 4179c431b436..beedbea0645d 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/Streaming/AsyncStreamingUpdateCollection.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/Streaming/AsyncStreamingUpdateCollection.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Linq; using System.Net.ServerSentEvents; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Azure.AI.Agents.Persistent.Telemetry; @@ -16,23 +17,41 @@ namespace Azure.AI.Agents.Persistent; /// -/// Implementation of collection abstraction over streaming agent updates. +/// Implementation of collection abstraction over streaming assistant updates. /// internal class AsyncStreamingUpdateCollection : AsyncCollectionResult { private readonly Func> _sendRequestAsync; private readonly CancellationToken _cancellationToken; private readonly OpenTelemetryScope? _scope; + private readonly ToolCallsResolver? _toolCallsResolver; + private readonly Func, int, AsyncCollectionResult> _submitToolOutputsToStreamAsync; + private readonly int _maxRetry; + private int _currRetry; + private readonly Func>> _cancelRunAsync; - public AsyncStreamingUpdateCollection(Func> sendRequestAsync, + public AsyncStreamingUpdateCollection( CancellationToken cancellationToken, + AutoFunctionCallOptions autoFunctionCallOptions, + int currentRetry, + Func> sendRequestAsync, + Func>> cancelRunAsync, + Func, int, AsyncCollectionResult> submitToolOutputsToStreamAsync, OpenTelemetryScope? scope = null) { Argument.AssertNotNull(sendRequestAsync, nameof(sendRequestAsync)); - _sendRequestAsync = sendRequestAsync; _cancellationToken = cancellationToken; _scope = scope; + _sendRequestAsync = sendRequestAsync; + _submitToolOutputsToStreamAsync = submitToolOutputsToStreamAsync; + if (autoFunctionCallOptions != null) + { + _toolCallsResolver = new(autoFunctionCallOptions.AutoFunctionCallDelegates); + _maxRetry = autoFunctionCallOptions.MaxRetry; + } + _currRetry = currentRetry; + _cancelRunAsync = cancelRunAsync; } public override ContinuationToken? GetContinuationToken(ClientResult page) @@ -51,16 +70,66 @@ public async override IAsyncEnumerable GetRawPagesAsync() protected async override IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) { -#pragma warning disable AZC0100 // ConfigureAwait(false) must be used. - await using IAsyncEnumerator enumerator = new AsyncStreamingUpdateEnumerator(page, _cancellationToken, _scope); -#pragma warning restore AZC0100 // ConfigureAwait(false) must be used. - while (await enumerator.MoveNextAsync().ConfigureAwait(false)) + ThreadRun? streamRun = null; + List toolOutputs = new(); + do { - var update = enumerator.Current; - // Send to telemetry (if needed) - _scope?.RecordStreamingUpdate(update); - yield return update; + IAsyncEnumerator enumerator = (toolOutputs.Count > 0 && streamRun != null) ? + _submitToolOutputsToStreamAsync(streamRun, toolOutputs, _currRetry).GetAsyncEnumerator(_cancellationToken) : + new AsyncStreamingUpdateEnumerator(page, _cancellationToken, _scope); + + toolOutputs.Clear(); + + try + { + bool hasError = false; + while (await enumerator.MoveNextAsync().ConfigureAwait(false)) + { + var streamingUpdate = enumerator.Current; + if (streamingUpdate is RequiredActionUpdate newActionUpdate && _toolCallsResolver != null) + { + ToolOutput toolOutput; + try + { + toolOutput = _toolCallsResolver.GetResolvedToolOutput( + newActionUpdate.FunctionName, + newActionUpdate.ToolCallId, + newActionUpdate.FunctionArguments + ); + } + catch (Exception ex) + { + string errorJson = JsonSerializer.Serialize(new { error = ex.GetBaseException().Message }); + toolOutput = new ToolOutput(newActionUpdate.ToolCallId, errorJson); + hasError = true; + } + toolOutputs.Add(toolOutput); + + streamRun = newActionUpdate.Value; + } + else + { + // Send to telemetry (if needed) + _scope?.RecordStreamingUpdate(streamingUpdate); + yield return streamingUpdate; + } + } + _currRetry = hasError ? _currRetry + 1 : _currRetry; + + if (streamRun != null && _currRetry > _maxRetry) + { + // Cancel the run if the max retry is reached + var cancelRunResponse = await _cancelRunAsync(streamRun.Id).ConfigureAwait(false); + yield return new StreamingUpdate(cancelRunResponse.Value, StreamingUpdateReason.RunCancelled); + yield break; + } + } + finally + { + await enumerator.DisposeAsync().ConfigureAwait(false); + } } + while (toolOutputs.Count > 0); } private sealed class AsyncStreamingUpdateEnumerator : IAsyncEnumerator diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/Streaming/StreamingUpdateCollection.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/Streaming/StreamingUpdateCollection.cs index 4b911b2afa69..b77cc9a188cb 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/Streaming/StreamingUpdateCollection.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/Streaming/StreamingUpdateCollection.cs @@ -6,33 +6,53 @@ using System.ClientModel.Primitives; using System.Collections; using System.Collections.Generic; +using System.IO; using System.Net.ServerSentEvents; +using System.Text.Json; using System.Threading; using Azure.AI.Agents.Persistent.Telemetry; +using System.Threading.Tasks; #nullable enable namespace Azure.AI.Agents.Persistent; /// -/// Implementation of collection abstraction over streaming agent updates. +/// Implementation of collection abstraction over streaming assistant updates. /// internal class StreamingUpdateCollection : CollectionResult { private readonly Func _sendRequest; private readonly CancellationToken _cancellationToken; private readonly OpenTelemetryScope? _scope; + private readonly ToolCallsResolver? _toolCallsResolver; + private readonly Func, int, CollectionResult> _submitToolOutputsToStream; + private readonly int _maxRetry; + private int _currRetry; + private readonly Func> _cancelRun; public StreamingUpdateCollection( - Func sendRequest, CancellationToken cancellationToken, + AutoFunctionCallOptions autoFunctionCallOptions, + int currentRetry, + Func sendRequest, + Func> cancelRun, + Func, int, CollectionResult> submitToolOutputsToStream, OpenTelemetryScope? scope = null) { Argument.AssertNotNull(sendRequest, nameof(sendRequest)); - _sendRequest = sendRequest; _cancellationToken = cancellationToken; _scope = scope; + _sendRequest = sendRequest; + _submitToolOutputsToStream = submitToolOutputsToStream; + if (autoFunctionCallOptions != null) + { + _toolCallsResolver = new(autoFunctionCallOptions.AutoFunctionCallDelegates); + _maxRetry = autoFunctionCallOptions.MaxRetry; + } + _currRetry = currentRetry; + _cancelRun = cancelRun; } public override ContinuationToken? GetContinuationToken(ClientResult page) @@ -50,14 +70,57 @@ public override IEnumerable GetRawPages() } protected override IEnumerable GetValuesFromPage(ClientResult page) { - using IEnumerator enumerator = new StreamingUpdateEnumerator(page, _cancellationToken, _scope); - while (enumerator.MoveNext()) + ThreadRun? streamRun = null; + List toolOutputs = new(); + do { - var update = enumerator.Current; - // Send to telemetry (if needed) - _scope?.RecordStreamingUpdate(update); - yield return update; + using IEnumerator enumerator = (toolOutputs.Count > 0 && streamRun != null) ? + _submitToolOutputsToStream(streamRun, toolOutputs, _currRetry).GetEnumerator() : + new StreamingUpdateEnumerator(page, _cancellationToken, _scope); + toolOutputs.Clear(); + bool hasError = false; + while (enumerator.MoveNext()) + { + var streamingUpdate = enumerator.Current; + if (streamingUpdate is RequiredActionUpdate newActionUpdate && _toolCallsResolver != null) + { + ToolOutput toolOutput; + try + { + toolOutput = _toolCallsResolver.GetResolvedToolOutput( + newActionUpdate.FunctionName, + newActionUpdate.ToolCallId, + newActionUpdate.FunctionArguments + ); + } + catch (Exception ex) + { + string errorJson = JsonSerializer.Serialize(new { error = ex.GetBaseException().Message }); + toolOutput = new ToolOutput(newActionUpdate.ToolCallId, errorJson); + hasError = true; + } + toolOutputs.Add(toolOutput); + + streamRun = newActionUpdate.Value; + } + else + { + // Send to telemetry (if needed) + _scope?.RecordStreamingUpdate(streamingUpdate); + yield return streamingUpdate; + } + } + _currRetry = hasError ? _currRetry + 1 : _currRetry; + + if (streamRun != null && _currRetry > _maxRetry) + { + // Cancel the run if the max retry is reached + var cancelRunResponse = _cancelRun(streamRun.Id); + yield return new StreamingUpdate(cancelRunResponse.Value, StreamingUpdateReason.RunCancelled); + yield break; + } } + while (toolOutputs.Count > 0); } private sealed class StreamingUpdateEnumerator : IEnumerator diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ThreadRuns.Streaming.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ThreadRuns.Streaming.cs index 4cbc3f81c82b..b8af13ddb7e6 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ThreadRuns.Streaming.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ThreadRuns.Streaming.cs @@ -81,7 +81,80 @@ public virtual AsyncCollectionResult CreateRunStreamingAsync(st parallelToolCalls: parallelToolCalls, metadata: metadata, include: null, - cancellationToken: cancellationToken + cancellationToken: cancellationToken, + autoFunctionCallOptions: null + ); + } + + /// + /// Begins a new streaming that evaluates a using a specified + /// . + /// + /// Identifier of the thread. + /// The ID of the agent that should run the thread. + /// Function calls defined in tools will be called automatically. + /// The overridden model name that the agent should use to run the thread. + /// The overridden system instructions that the agent should use to run the thread. + /// + /// Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior + /// on a per-run basis without overriding other instructions. + /// + /// Adds additional messages to the thread before creating the run. + /// The overridden list of enabled tools that the agent should use to run the thread. + /// + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output + /// more random, while lower values like 0.2 will make it more focused and deterministic. + /// + /// + /// An alternative to sampling with temperature, called nucleus sampling, where the model + /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens + /// comprising the top 10% probability mass are considered. + /// + /// We generally recommend altering this or temperature but not both. + /// + /// + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only + /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, + /// the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort + /// to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of + /// completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// The strategy to use for dropping messages as the context windows moves forward. + /// Controls whether or not and which tool is called by the model. + /// Specifies the format that the model must output. + /// If `true` functions will run in parallel during tool use. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. +#pragma warning disable AZC0015 // Unexpected client method return type. + public virtual AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, AutoFunctionCallOptions autoFunctionCallOptions, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) +#pragma warning restore AZC0015 // Unexpected client method return type. + { + // This method added for compatibility, before the include parameter support was enabled. + return CreateRunStreamingAsync( + threadId: threadId, + agentId: agentId, + overrideModelName: overrideModelName, + overrideInstructions: overrideInstructions, + additionalInstructions: additionalInstructions, + additionalMessages: additionalMessages, + overrideTools: overrideTools, + temperature: temperature, + topP: topP, + maxPromptTokens: maxPromptTokens, + maxCompletionTokens: maxCompletionTokens, + truncationStrategy: truncationStrategy, + toolChoice: toolChoice, + responseFormat: responseFormat, + parallelToolCalls: parallelToolCalls, + metadata: metadata, + include: null, + cancellationToken: cancellationToken, + autoFunctionCallOptions: autoFunctionCallOptions ); } /// @@ -91,6 +164,7 @@ public virtual AsyncCollectionResult CreateRunStreamingAsync(st /// Identifier of the thread. /// The ID of the agent that should run the thread. /// + /// If specified, function calls defined in tools will be called automatically. /// A list of additional fields to include in the response. /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` /// to fetch the file search result content. @@ -133,7 +207,7 @@ public virtual AsyncCollectionResult CreateRunStreamingAsync(st /// or is null. /// is an empty string, and was expected to be non-empty. #pragma warning disable AZC0015 // Unexpected client method return type. - public virtual AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, IEnumerable include, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) + public virtual AsyncCollectionResult CreateRunStreamingAsync(string threadId, string agentId, IEnumerable include, AutoFunctionCallOptions autoFunctionCallOptions = null, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) #pragma warning restore AZC0015 // Unexpected client method return type. { var scope = OpenTelemetryScope.StartCreateRunStreaming(threadId, agentId, _endpoint); @@ -163,7 +237,17 @@ public virtual AsyncCollectionResult CreateRunStreamingAsync(st async Task sendRequestAsync() => await CreateRunStreamingAsync(threadId, createRunRequest.ToRequestContent(), context, include:include).ConfigureAwait(false); - return new AsyncStreamingUpdateCollection(sendRequestAsync, cancellationToken, scope: scope); + AsyncCollectionResult submitToolOutputsToStreamAsync(ThreadRun run, IEnumerable toolOutputs, int currRetry) => + this.SubmitToolOutputsToStreamWitAutoFunctionCallAsync(run, toolOutputs, currRetry, default); + async Task> cancelRunAsync(string runId) => await this.CancelRunAsync(threadId, runId).ConfigureAwait(false); + return new AsyncStreamingUpdateCollection( + cancellationToken, + autoFunctionCallOptions, + 0, + sendRequestAsync, + cancelRunAsync, + submitToolOutputsToStreamAsync, + scope); } /// /// Begins a new streaming that evaluates a using a specified @@ -230,7 +314,78 @@ public virtual CollectionResult CreateRunStreaming(string threa parallelToolCalls: parallelToolCalls, metadata: metadata, include: null, - cancellationToken: cancellationToken); + cancellationToken: cancellationToken, + autoFunctionCallOptions: null); + } + + /// + /// Begins a new streaming that evaluates a using a specified + /// . + /// + /// Identifier of the thread. + /// The ID of the agent that should run the thread. + /// If specified, function calls defined in tools will be called automatically. + /// The overridden model name that the agent should use to run the thread. + /// The overridden system instructions that the agent should use to run the thread. + /// + /// Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior + /// on a per-run basis without overriding other instructions. + /// + /// Adds additional messages to the thread before creating the run. + /// The overridden list of enabled tools that the agent should use to run the thread. + /// + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output + /// more random, while lower values like 0.2 will make it more focused and deterministic. + /// + /// + /// An alternative to sampling with temperature, called nucleus sampling, where the model + /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens + /// comprising the top 10% probability mass are considered. + /// + /// We generally recommend altering this or temperature but not both. + /// + /// + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only + /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, + /// the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort + /// to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of + /// completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// The strategy to use for dropping messages as the context windows moves forward. + /// Controls whether or not and which tool is called by the model. + /// Specifies the format that the model must output. + /// If `true` functions will run in parallel during tool use. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. +#pragma warning disable AZC0015 // Unexpected client method return type. + public virtual CollectionResult CreateRunStreaming(string threadId, string agentId, AutoFunctionCallOptions autoFunctionCallOptions, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) +#pragma warning restore AZC0015 // Unexpected client method return type. + { + return CreateRunStreaming( + threadId: threadId, + agentId: agentId, + overrideModelName: overrideModelName, + overrideInstructions: overrideInstructions, + additionalInstructions: additionalInstructions, + additionalMessages: additionalMessages, + overrideTools: overrideTools, + temperature: temperature, + topP: topP, + maxPromptTokens: maxPromptTokens, + maxCompletionTokens: maxCompletionTokens, + truncationStrategy: truncationStrategy, + toolChoice: toolChoice, + responseFormat: responseFormat, + parallelToolCalls: parallelToolCalls, + metadata: metadata, + include: null, + cancellationToken: cancellationToken, + autoFunctionCallOptions: autoFunctionCallOptions); } /// @@ -244,6 +399,7 @@ public virtual CollectionResult CreateRunStreaming(string threa /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` /// to fetch the file search result content. /// + /// If specified, function calls defined in tools will be called automatically. /// The overridden model name that the agent should use to run the thread. /// The overridden system instructions that the agent should use to run the thread. /// @@ -282,7 +438,7 @@ public virtual CollectionResult CreateRunStreaming(string threa /// or is null. /// is an empty string, and was expected to be non-empty. #pragma warning disable AZC0015 // Unexpected client method return type. - public virtual CollectionResult CreateRunStreaming(string threadId, string agentId, IEnumerable include, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) + public virtual CollectionResult CreateRunStreaming(string threadId, string agentId, IEnumerable include, AutoFunctionCallOptions autoFunctionCallOptions = null, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) #pragma warning restore AZC0015 // Unexpected client method return type. { var scope = OpenTelemetryScope.StartCreateRunStreaming(threadId, agentId, _endpoint); @@ -310,7 +466,18 @@ public virtual CollectionResult CreateRunStreaming(string threa RequestContext context = FromCancellationToken(cancellationToken); Response sendRequest() => CreateRunStreaming(threadId, createRunRequest.ToRequestContent(), context, include: include); - return new StreamingUpdateCollection(sendRequest, cancellationToken, scope: scope); + CollectionResult submitToolOutputsToStream(ThreadRun run, IEnumerable toolOutputs, int currRetry) => + this.SubmitToolOutputsToStreamWitAutoFunctionCall(run, toolOutputs, currRetry); + Response cancelRun(string runId) => this.CancelRun(threadId, runId); + + return new StreamingUpdateCollection( + cancellationToken, + autoFunctionCallOptions, + 0, + sendRequest, + cancelRun, + submitToolOutputsToStream, + scope); } /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. /// The that the tool outputs should be submitted to. @@ -319,6 +486,23 @@ public virtual CollectionResult CreateRunStreaming(string threa /// or is null. #pragma warning disable AZC0015 // Unexpected client method return type. public virtual CollectionResult SubmitToolOutputsToStream(ThreadRun run, IEnumerable toolOutputs, CancellationToken cancellationToken = default) +#pragma warning restore AZC0015 // Unexpected client method return type. + { + Argument.AssertNotNull(run, nameof(run)); + Argument.AssertNotNull(toolOutputs, nameof(toolOutputs)); + + return SubmitToolOutputsToStreamWitAutoFunctionCall(run, toolOutputs, Int32.MaxValue, cancellationToken); + } + + /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. + /// The that the tool outputs should be submitted to. + /// A list of tools for which the outputs are being submitted. + /// The cancellation token to use. + /// The count of current retry of auto function calls. Cancel the run if reach to the maxinum. + /// If specified, function calls defined in tools will be called automatically. + /// or is null. +#pragma warning disable AZC0015 // Unexpected client method return type. + internal virtual CollectionResult SubmitToolOutputsToStreamWitAutoFunctionCall(ThreadRun run, IEnumerable toolOutputs, int currentRetry = 0, CancellationToken cancellationToken = default, AutoFunctionCallOptions autoFunctionCallOptions = null) #pragma warning restore AZC0015 // Unexpected client method return type. { var scope = OpenTelemetryScope.StartCreateRunStreaming(run.Id, run.AssistantId, _endpoint); @@ -327,8 +511,19 @@ public virtual CollectionResult SubmitToolOutputsToStream(Threa SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new(toolOutputs.ToList(), true, null); RequestContext context = FromCancellationToken(cancellationToken); - Response sendRequest() => SubmitToolOutputsInternal(run.ThreadId, run.Id, true, submitToolOutputsToRunRequest.ToRequestContent(), context, scope:scope); - return new StreamingUpdateCollection(sendRequest, cancellationToken, scope); + Response sendRequest() => SubmitToolOutputsInternal(run.ThreadId, run.Id, true, submitToolOutputsToRunRequest.ToRequestContent(), context); + CollectionResult submitToolOutputsToStream(ThreadRun run, IEnumerable toolOutputs, int currRetry) => + this.SubmitToolOutputsToStreamWitAutoFunctionCall(run, toolOutputs, currentRetry); + Response cancelRun(string runId) => this.CancelRun(run.ThreadId, runId); + + return new StreamingUpdateCollection( + cancellationToken, + autoFunctionCallOptions, + currentRetry, + sendRequest, + cancelRun, + submitToolOutputsToStream, + scope); } /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. @@ -338,6 +533,23 @@ public virtual CollectionResult SubmitToolOutputsToStream(Threa /// or is null. #pragma warning disable AZC0015 // Unexpected client method return type. public virtual AsyncCollectionResult SubmitToolOutputsToStreamAsync(ThreadRun run, IEnumerable toolOutputs, CancellationToken cancellationToken = default) +#pragma warning restore AZC0015 // Unexpected client method return type. + { + Argument.AssertNotNull(run, nameof(run)); + Argument.AssertNotNull(toolOutputs, nameof(toolOutputs)); + + return SubmitToolOutputsToStreamWitAutoFunctionCallAsync(run, toolOutputs, Int32.MaxValue, cancellationToken); + } + + /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. + /// The that the tool outputs should be submitted to. + /// A list of tools for which the outputs are being submitted. + /// The cancellation token to use. + /// The count of current retry of auto function calls. Cancel the run if reach to the maxinum. + /// If specified, function calls defined in tools will be called automatically. + /// or is null. +#pragma warning disable AZC0015 // Unexpected client method return type. + internal virtual AsyncCollectionResult SubmitToolOutputsToStreamWitAutoFunctionCallAsync(ThreadRun run, IEnumerable toolOutputs, int currentRetry = 0, CancellationToken cancellationToken = default, AutoFunctionCallOptions autoFunctionCallOptions = null) #pragma warning restore AZC0015 // Unexpected client method return type. { var scope = OpenTelemetryScope.StartCreateRunStreaming(run.Id, run.AssistantId, _endpoint); @@ -347,7 +559,18 @@ public virtual AsyncCollectionResult SubmitToolOutputsToStreamA SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new(toolOutputs.ToList(), true, null); RequestContext context = FromCancellationToken(cancellationToken); async Task sendRequestAsync() => await SubmitToolOutputsInternalAsync(run.ThreadId, run.Id, true, submitToolOutputsToRunRequest.ToRequestContent(), context).ConfigureAwait(false); - return new AsyncStreamingUpdateCollection(sendRequestAsync, cancellationToken, scope); + AsyncCollectionResult submitToolOutputsToStreamAsync(ThreadRun run, IEnumerable toolOutputs, int currRetry) => + this.SubmitToolOutputsToStreamWitAutoFunctionCallAsync(run, toolOutputs, currRetry); + async Task> cancelRunAsync(string runId) => await this.CancelRunAsync(run.ThreadId, runId).ConfigureAwait(false); + + return new AsyncStreamingUpdateCollection( + cancellationToken, + autoFunctionCallOptions, + currentRetry, + sendRequestAsync, + cancelRunAsync, + submitToolOutputsToStreamAsync, + scope); } internal async Task CreateRunStreamingAsync(string threadId, RequestContent content, RequestContext context = null, IEnumerable include = null) diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ToolCallsResolver.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ToolCallsResolver.cs new file mode 100644 index 000000000000..ec884c6adc24 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ToolCallsResolver.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Text.Json; + +namespace Azure.AI.Agents.Persistent +{ + /// + /// ToolCallsResolver is used to resolve tool calls in the streaming API. + /// + internal class ToolCallsResolver + { + private readonly Dictionary _toolDelegates = new(); + + internal ToolCallsResolver(Dictionary toolDelegates) + { + _toolDelegates = toolDelegates; + } + + /// + /// Resolves the tool call by invoking the delegate associated with the function name. + /// It casts the function arguments to the appropriate types based on the delegate's parameters. + /// without knowing the answer. + /// + internal ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string functionArguments) + { + if (!_toolDelegates.TryGetValue(functionName, out var func)) + { + string error = $"Function {functionName} not found."; + throw new MissingMethodException(error); + } + + var result = Resolve(func, functionArguments); + return new ToolOutput(toolCallId, result == null ? "" : result.ToString()); + } + + /// + /// Resolves the function call by invoking the delegate associated with the function name. + /// + /// + /// + /// + internal static object Resolve(Delegate function, string functionArguments) + { + JsonDocument argumentsJson = JsonDocument.Parse(functionArguments); + MethodInfo method = function.Method; + var args = new List(); + foreach (ParameterInfo param in function.Method.GetParameters()) + { + if (argumentsJson.RootElement.TryGetProperty(param.Name ?? "", out JsonElement element)) + { + object val = GetArgumentValue(param.Name, param.ParameterType, element); + args.Add(val); + } + else if (param.DefaultValue != null) + { + args.Add(param.DefaultValue); + } + // check if the value is not in arguments, but the parameter is required, throw error + else if (Nullable.GetUnderlyingType(param.ParameterType) == null) + { + throw new ArgumentException($"Missing required argument {param.Name} for function {function.Method.Name}"); + } + } + return function.DynamicInvoke(args.ToArray()); + } + + private static object GetArgumentValue(string name, Type type, JsonElement element) + { + if (type == typeof(string)) + { + return element.GetString(); + } + else if (type == typeof(int)) + { + if (element.TryGetInt32(out int val)) + return val; + } + else if (type == typeof(ushort)) + { + if (element.TryGetInt16(out short val)) + return val; + } + else if (type == typeof(float)) + { + if (element.TryGetSingle(out float val)) + return val; + } + else if (type == typeof(uint)) + { + if (element.TryGetUInt32(out uint val)) + return val; + } + else if (type == typeof(decimal)) + { + if (element.TryGetDecimal(out decimal val)) + return val; + } + else if (type == typeof(double)) + { + if (element.TryGetDouble(out double val)) + return val; + } + else if (type == typeof(long)) + { + if (element.TryGetInt64(out long val)) + return val; + } + else if (type == typeof(bool)) + { + if (TryParseBoolean(element, out bool? val)) + return val; + } + // TODO: the following code has been testedwith Dictionary, + // deserializable Address class with address and city fields + // and Address[]. But need more testings. + //else if (type == typeof(object)) + //{ + // return element.GetRawText(); + //} + //else if (IsDictionaryType(type)) + //{ + // Type[] genericArguments = type.GetGenericArguments(); + // Type dictionaryType = typeof(Dictionary<,>).MakeGenericType(typeof(string), genericArguments[1]); + + // // Create an instance of the dictionary + // var dict = Activator.CreateInstance(dictionaryType); + + // MethodInfo addMethod = dictionaryType.GetMethod("Add"); + + // foreach (var prop in element.EnumerateObject()) + // { + // object val = GetArgumentValue(prop.Name, genericArguments[1], prop.Value); + // addMethod.Invoke(dict, [prop.Name, val]); + // } + // return dict; + //} + //else if (type.IsArray) + //{ + // Type elementType = type.GetElementType()!; + // Array array = Array.CreateInstance(elementType, element.GetArrayLength()); + // int i = 0; + // foreach (var item in element.EnumerateArray()) + // { + // object val = GetArgumentValue(name, elementType, item); + // array.SetValue(val, i++); + // } + // return array; + //} + //else if (TryDeserialize(element.GetRawText(), type, out object val)) + //{ + // return val; + //} + throw new ArgumentException($"Received {element.GetRawText()}, but {name} in function implementation is {type}"); + } + + /// + /// JsonElement doesn't offer TryGetBoolean but offers GetBoolean that can throw exception + /// With that said, we need to create a custom TryGetBoolean method + /// + private static bool TryParseBoolean(JsonElement element, out bool? value) + { + switch (element.ValueKind) + { + case JsonValueKind.True: + value = true; + return true; + case JsonValueKind.False: + value = false; + return true; + default: + value = default; + return false; + } + } + + // Uncommon this to support deserializable class + //private static bool TryDeserialize(string input, Type type, out object obj) + //{ + // try + // { + // obj = JsonSerializer.Deserialize(input, type, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true }); + // return true; + // } + // catch (JsonException) + // { + // obj = null; + // return false; + // } + //} + + // Uncommon this to support dictionary + //private static bool IsDictionaryType(Type type) + //{ + // // Check if the type is a generic type + // if (type.IsGenericType) + // { + // // Get the generic type definition + // Type genericTypeDefinition = type.GetGenericTypeDefinition(); + + // // Check if the generic type definition is Dictionary<,> + // if (genericTypeDefinition == typeof(Dictionary<,>)) + // { + // return true; + // } + // } + + // return false; + //} + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/AIAgentsTestEnvironment.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/AIAgentsTestEnvironment.cs index 02d1c060500f..5df115e4865c 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tests/AIAgentsTestEnvironment.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/AIAgentsTestEnvironment.cs @@ -19,5 +19,6 @@ public class AIAgentsTestEnvironment : TestEnvironment public string BING_CONECTION_ID => GetRecordedVariable("AZURE_BING_CONECTION_ID"); public string SHAREPOINT_CONNECTION_ID => GetRecordedVariable("AZURE_SHAREPOINT_CONNECTION_ID"); public string FABRIC_CONNECTION_ID => GetRecordedVariable("AZURE_FABRIC_CONNECTION_ID"); + public string BING_CUSTOM_CONNECTION_ID => GetRecordedVariable("AZURE_BING_CUSTOM_CONNECTION_ID"); } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs index cead4a3bb908..52db3cd89295 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs @@ -13,6 +13,7 @@ using Azure.Core.TestFramework; using Azure.Identity; using NUnit.Framework; +using NUnit.Framework.Internal.Execution; namespace Azure.AI.Agents.Persistent.Tests { @@ -1400,6 +1401,129 @@ await client.Messages.CreateMessageAsync( } } + [RecordedTest] + [TestCase(true)] + [TestCase(false)] + public async Task TestAutomaticSubmitToolOutputs(bool correctDefinition) + { + if (!IsAsync) + Assert.Inconclusive(STREAMING_CONSTRAINT); + + string GetHumidityByAddress(string address) + { + return address.Contains("Seattle") ? "80" : "60"; + } + + FunctionToolDefinition correctGeHhumidityByAddressTool = new( + name: "GetHumidityByAddress", + description: "Get humidity by address", + parameters: BinaryData.FromObjectAsJson( + new + { + Type = "object", + Properties = new + { + Address = new + { + Type = "string", + Description = "Address" + } + }, + Required = new[] { "address" } + }, + new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); + + FunctionToolDefinition incorrectGeHhumidityByAddressTool = new( + name: "GetHumidityByAddress", + description: "Get humidity by address", + parameters: BinaryData.FromObjectAsJson( + new + { + Type = "object", + Properties = new + { + Addresses = new + { + Type = "array", + Description = "A list of addresses", + Items = new + { + Type = "object", + Properties = new + { + Street = new + { + Type = "string", + Description = "Street" + }, + City = new + { + Type = "string", + description = "city" + }, + }, + Required = new[] { "street", "city" } + } + }, + }, + Required = new[] { "address" } + }, + new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); + + Dictionary toolDelegates = new(); + toolDelegates.Add(nameof(GetHumidityByAddress), GetHumidityByAddress); + + PersistentAgentsClient client = GetClient(); + string output = ""; + bool completed = false; + bool cancelled = false; + List tools = new(); + AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 0); + if (correctDefinition) + tools.Add(correctGeHhumidityByAddressTool); + else + tools.Add(incorrectGeHhumidityByAddressTool); + + PersistentAgent agent = await client.Administration.CreateAgentAsync( + model: "gpt-4o-mini", + name: AGENT_NAME, + instructions: "Use the provided functions to help answer questions.", + tools: tools + ); + PersistentAgentThread thread = await client.Threads.CreateThreadAsync(); + + PersistentThreadMessage message = await client.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "Get humidity for address, 456 2nd Ave in city, Seattle"); + + await foreach (StreamingUpdate streamingUpdate in client.Runs.CreateRunStreamingAsync(thread.Id, agent.Id, include: null, autoFunctionCallOptions: autoFunctionCallOptions)) + { + if (streamingUpdate is MessageContentUpdate contentUpdate) + { + output += contentUpdate.Text; + } + else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) + { + completed = true; + } + else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCancelled) + { + cancelled = true; + } + } + + if (correctDefinition) + { + Assert.True(output.Contains("80")); + Assert.True(completed); + } + else + { + Assert.True(cancelled); + } + } + #region Helpers private static string CreateTempDirMayBe() diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Bing_Custom_Search.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Bing_Custom_Search.cs new file mode 100644 index 000000000000..919bde77f989 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Bing_Custom_Search.cs @@ -0,0 +1,199 @@ +// 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.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Tests; + +public partial class Sample_PersistentAgents_Bing_Custom_Search : SamplesBase +{ + [Test] + [AsyncOnly] + public async Task BingCustomSearchExampleAsync() + { + #region Snippet:AgentsBingCustomSearch_CreateProject +#if SNIPPET + var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); + var connectionId = System.Environment.GetEnvironmentVariable("BING_CUSTOM_CONNECTION_ID"); +#else + var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; + var connectionId = TestEnvironment.BING_CUSTOM_CONNECTION_ID; +#endif + PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential()); + #endregion + #region Snippet:AgentsBingCustomSearch_GetConnection + BingCustomSearchToolDefinition bingCustomSearchTool = new( + new BingCustomSearchToolParameters(connectionId, "your_config_instance_name") // Replace with your actual configuration instance name + ); + #endregion + #region Snippet:AgentsBingCustomSearchAsync_CreateAgent + PersistentAgent agent = await agentClient.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "my-agent", + instructions: "You are a helpful agent.", + tools: [ bingCustomSearchTool ]); + #endregion + // Create thread for communication + #region Snippet:AgentsBingCustomSearchAsync_CreateThreadMessage + PersistentAgentThread thread = await agentClient.Threads.CreateThreadAsync(); + + // Create message to thread + PersistentThreadMessage message = await agentClient.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "How many medals did the USA win in the 2024 summer olympics?"); + + // Run the agent + ThreadRun run = await agentClient.Runs.CreateRunAsync(thread, agent); + do + { + await Task.Delay(TimeSpan.FromMilliseconds(500)); + run = await agentClient.Runs.GetRunAsync(thread.Id, run.Id); + } + while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + + Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + #endregion + + #region Snippet:AgentsBingCustomSearchAsync_Print + AsyncPageable messages = agentClient.Messages.GetMessagesAsync( + threadId: thread.Id, + order: ListSortOrder.Ascending + ); + + await foreach (PersistentThreadMessage threadMessage in messages) + { + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + string response = textItem.Text; + if (textItem.Annotations != null) + { + foreach (MessageTextAnnotation annotation in textItem.Annotations) + { + if (annotation is MessageTextUriCitationAnnotation uriAnnotation) + { + response = response.Replace(uriAnnotation.Text, $" [{uriAnnotation.UriCitation.Title}]({uriAnnotation.UriCitation.Uri})"); + } + } + } + Console.Write($"Agent response: {response}"); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($""); + } + Console.WriteLine(); + } + } + #endregion + #region Snippet:AgentsBingCustomSearchCleanupAsync + await agentClient.Threads.DeleteThreadAsync(threadId: thread.Id); + await agentClient.Administration.DeleteAgentAsync(agentId: agent.Id); + #endregion + } + + [Test] + [SyncOnly] + public void BingCustomSearchExample() + { +#if SNIPPET + var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); + var connectionId = System.Environment.GetEnvironmentVariable("BING_CUSTOM_CONNECTION_ID"); +#else + var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; + var connectionId = TestEnvironment.BING_CUSTOM_CONNECTION_ID; +#endif + PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential()); + BingCustomSearchToolDefinition bingCustomSearchTool = new( + new BingCustomSearchToolParameters(connectionId, "your_config_instance_name") // Replace with your actual configuration instance name + ); + #region Snippet:AgentsBingCustomSearch_CreateAgent + PersistentAgent agent = agentClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "my-agent", + instructions: "You are a helpful agent.", + tools: [bingCustomSearchTool]); + #endregion + // Create thread for communication + #region Snippet:AgentsBingCustomSearch_CreateThreadMessage + PersistentAgentThread thread = agentClient.Threads.CreateThread(); + + // Create message to thread + PersistentThreadMessage message = agentClient.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "How many medals did the USA win in the 2024 summer olympics?"); + + // Run the agent + ThreadRun run = agentClient.Runs.CreateRun(thread, agent); + do + { + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = agentClient.Runs.GetRun(thread.Id, run.Id); + } + while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + + Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + #endregion + + #region Snippet:AgentsBingCustomSearch_Print + Pageable messages = agentClient.Messages.GetMessages( + threadId: thread.Id, + order: ListSortOrder.Ascending + ); + + foreach (PersistentThreadMessage threadMessage in messages) + { + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + string response = textItem.Text; + if (textItem.Annotations != null) + { + foreach (MessageTextAnnotation annotation in textItem.Annotations) + { + if (annotation is MessageTextUriCitationAnnotation uriAnnotation) + { + response = response.Replace(uriAnnotation.Text, $" [{uriAnnotation.UriCitation.Title}]({uriAnnotation.UriCitation.Uri})"); + } + } + } + Console.Write($"Agent response: {response}"); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($""); + } + Console.WriteLine(); + } + } + #endregion + #region Snippet:AgentsBingCustomSearchCleanup + agentClient.Threads.DeleteThread(threadId: thread.Id); + agentClient.Administration.DeleteAgent(agentId: agent.Id); + #endregion + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Multiple_Connected_Agents.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Multiple_Connected_Agents.cs new file mode 100644 index 000000000000..15ca3de562c4 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Multiple_Connected_Agents.cs @@ -0,0 +1,223 @@ +// 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.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Tests; + +public partial class Sample_PersistentAgents_Multiple_Connected_Agents : SamplesBase +{ + [Test] + [AsyncOnly] + public async Task MultipleConnectedAgentsExampleAsync() + { + #region Snippet:AgentsMultipleConnectedAgents_CreateProject +#if SNIPPET + var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; +#endif + PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential()); + #endregion + #region Snippet:AgentsMultipleConnectedAgentsAsync_CreateSubAgents + PersistentAgent stockPriceAgent = await agentClient.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "stock-price-bot", + instructions: "Your job is to get the stock price of a company. If asked for the Microsoft stock price, always return $350."); + + PersistentAgent weatherAgent = await agentClient.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "weather-bot", + instructions: "Your job is to get the weather for a given location. If asked for the weather in Seattle, always return 60 degrees and cloudy."); + #endregion + #region Snippet:AgentsMultipleConnectedAgents_GetConnectedAgents + ConnectedAgentToolDefinition stockPriceConnectedAgentTool = new( + new ConnectedAgentDetails( + id: stockPriceAgent.Id, + name: "stock_price_bot", + description: "Gets the stock price of a company" + ) + ); + + ConnectedAgentToolDefinition weatherConnectedAgentTool = new( + new ConnectedAgentDetails( + id: weatherAgent.Id, + name: "weather_bot", + description: "Gets the weather for a given location" + ) + ); + #endregion + #region Snippet:AgentsMultipleConnectedAgentsAsync_CreateAgent + PersistentAgent agent = await agentClient.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "my-assistant", + instructions: "You are a helpful assistant, and use the connected agents to get stock prices and weather.", + tools: [stockPriceConnectedAgentTool, weatherConnectedAgentTool]); + #endregion + // Create thread for communication + #region Snippet:AgentsMultipleConnectedAgentsAsync_CreateThreadMessage + PersistentAgentThread thread = await agentClient.Threads.CreateThreadAsync(); + + // Create message to thread + PersistentThreadMessage message = await agentClient.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "What is the stock price of Microsoft and the weather in Seattle?"); + + // Run the agent + ThreadRun run = await agentClient.Runs.CreateRunAsync(thread, agent); + do + { + await Task.Delay(TimeSpan.FromMilliseconds(500)); + run = await agentClient.Runs.GetRunAsync(thread.Id, run.Id); + } + while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + + Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + #endregion + + #region Snippet:AgentsMultipleConnectedAgentsAsync_Print + AsyncPageable messages = agentClient.Messages.GetMessagesAsync( + threadId: thread.Id, + order: ListSortOrder.Ascending + ); + + await foreach (PersistentThreadMessage threadMessage in messages) + { + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + Console.Write(textItem.Text); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($""); + } + Console.WriteLine(); + } + } + #endregion + #region Snippet:AgentsMultipleConnectedAgentsCleanupAsync + await agentClient.Threads.DeleteThreadAsync(threadId: thread.Id); + await agentClient.Administration.DeleteAgentAsync(agentId: agent.Id); + await agentClient.Administration.DeleteAgentAsync(agentId: stockPriceAgent.Id); + await agentClient.Administration.DeleteAgentAsync(agentId: weatherAgent.Id); + #endregion + } + + [Test] + [SyncOnly] + public void MultipleConnectedAgentsExample() + { +#if SNIPPET + var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; +#endif + PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential()); + #region Snippet:AgentsMultipleConnectedAgents_CreateSubAgents + PersistentAgent stockPriceAgent = agentClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "stock-price-bot", + instructions: "Your job is to get the stock price of a company. If asked for the Microsoft stock price, always return $350."); + + PersistentAgent weatherAgent = agentClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "weather-bot", + instructions: "Your job is to get the weather for a given location. If asked for the weather in Seattle, always return 60 degrees and cloudy."); + #endregion + ConnectedAgentToolDefinition stockPriceConnectedAgentTool = new( + new ConnectedAgentDetails( + id: stockPriceAgent.Id, + name: "stock_price_bot", + description: "Gets the stock price of a company" + ) + ); + + ConnectedAgentToolDefinition weatherConnectedAgentTool = new( + new ConnectedAgentDetails( + id: weatherAgent.Id, + name: "weather_bot", + description: "Gets the weather for a given location" + ) + ); + #region Snippet:AgentsMultipleConnectedAgents_CreateAgent + PersistentAgent agent = agentClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "my-assistant", + instructions: "You are a helpful assistant, and use the connected agents to get stock prices and weather.", + tools: [stockPriceConnectedAgentTool, weatherConnectedAgentTool]); + #endregion + // Create thread for communication + #region Snippet:AgentsMultipleConnectedAgents_CreateThreadMessage + PersistentAgentThread thread = agentClient.Threads.CreateThread(); + + // Create message to thread + PersistentThreadMessage message = agentClient.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "What is the stock price of Microsoft and the weather in Seattle?"); + + // Run the agent + ThreadRun run = agentClient.Runs.CreateRun(thread, agent); + do + { + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = agentClient.Runs.GetRun(thread.Id, run.Id); + } + while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + + Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + #endregion + + #region Snippet:AgentsMultipleConnectedAgents_Print + Pageable messages = agentClient.Messages.GetMessages( + threadId: thread.Id, + order: ListSortOrder.Ascending + ); + + foreach (PersistentThreadMessage threadMessage in messages) + { + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + Console.Write(textItem.Text); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($""); + } + Console.WriteLine(); + } + } + #endregion + #region Snippet:AgentsMultipleConnectedAgentsCleanup + agentClient.Threads.DeleteThread(threadId: thread.Id); + agentClient.Administration.DeleteAgent(agentId: agent.Id); + agentClient.Administration.DeleteAgent(agentId: stockPriceAgent.Id); + agentClient.Administration.DeleteAgent(agentId: weatherAgent.Id); + #endregion + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Streaming_with_Auto_Function_Call.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Streaming_with_Auto_Function_Call.cs new file mode 100644 index 000000000000..e24908bbd4a9 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Streaming_with_Auto_Function_Call.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ClientModel; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Microsoft.Extensions.Options; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Tests; + +public partial class Sample_PersistentAgents_Streaming_with_Auto_Function_Call : SamplesBase +{ + #region Snippet:StreamingWithAutoFunctionCall_DefineFunctionTools + // Example of a function that defines no parameters + private string GetUserFavoriteCity() => "Seattle, WA"; + private FunctionToolDefinition getUserFavoriteCityTool = new("GetUserFavoriteCity", "Gets the user's favorite city."); + // Example of a function with a single required parameter + private string GetCityNickname(string location) => location switch + { + "Seattle, WA" => "The Emerald City", + _ => throw new NotImplementedException(), + }; + private FunctionToolDefinition getCityNicknameTool = new( + name: "GetCityNickname", + description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", + parameters: BinaryData.FromObjectAsJson( + new + { + Type = "object", + Properties = new + { + Location = new + { + Type = "string", + Description = "The city and state, e.g. San Francisco, CA", + }, + }, + Required = new[] { "location" }, + }, + new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); + // Example of a function with one required and one optional, enum parameter + private string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch + { + "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", + _ => throw new NotImplementedException() + }; + private FunctionToolDefinition getCurrentWeatherAtLocationTool = new( + name: "GetWeatherAtLocation", + description: "Gets the current weather at a provided location.", + parameters: BinaryData.FromObjectAsJson( + new + { + Type = "object", + Properties = new + { + Location = new + { + Type = "string", + Description = "The city and state, e.g. San Francisco, CA", + }, + Unit = new + { + Type = "string", + Enum = new[] { "c", "f" }, + }, + }, + Required = new[] { "location" }, + }, + new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); + #endregion + + [Test] + [AsyncOnly] + public async Task AutoFunctionCallingWithStreamingExampleAsync() + { + #region Snippet:StreamingWithAutoFunctionCall_CreateClient +#if SNIPPET + var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; +#endif + PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential()); + #endregion + + #region Snippet:StreamingWithAutoFunctionCallAsync_CreateAgent + PersistentAgent agent = await client.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "SDK Test Agent - Functions", + instructions: "You are a weather bot. Use the provided functions to help answer questions. " + + "Customize your responses to the user's preferences as much as possible and use friendly " + + "nicknames for cities whenever possible.", + tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] + ); + #endregion + + #region Snippet:StreamingWithAutoFunctionCallAsync_CreateThreadMessage + PersistentAgentThread thread = await client.Threads.CreateThreadAsync(); + + PersistentThreadMessage message = await client.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "What's the weather like in my favorite city?"); + #endregion + + #region Snippet:StreamingWithAutoFunctionCall_EnableAutoFunctionCalls + List toolOutputs = new(); + Dictionary toolDelegates = new(); + toolDelegates.Add(nameof(GetWeatherAtLocation), GetWeatherAtLocation); + toolDelegates.Add(nameof(GetCityNickname), GetCityNickname); + toolDelegates.Add(nameof(GetUserFavoriteCity), GetUserFavoriteCity); + AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 10); + #endregion + + #region Snippet:StreamingWithAutoFunctionCallAsync + await foreach (StreamingUpdate streamingUpdate in client.Runs.CreateRunStreamingAsync(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions)) + { + if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) + { + Console.WriteLine("--- Run started! ---"); + } + else if (streamingUpdate is MessageContentUpdate contentUpdate) + { + Console.Write(contentUpdate.Text); + } + else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) + { + Console.WriteLine(); + Console.WriteLine("--- Run completed! ---"); + } + } + #endregion + + #region Snippet:StreamingWithAutoFunctionCallAsync_Cleanup + await client.Threads.DeleteThreadAsync(thread.Id); + await client.Administration.DeleteAgentAsync(agent.Id); + #endregion + } + + [Test] + [SyncOnly] + public void AutoFunctionCallingWithStreamingExample() + { +#if SNIPPET + var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; +#endif + + PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential()); + + #region Snippet:StreamingWithAutoFunctionCall_CreateAgent + PersistentAgent agent = client.Administration.CreateAgent( + model: modelDeploymentName, + name: "SDK Test Agent - Functions", + instructions: "You are a weather bot. Use the provided functions to help answer questions. " + + "Customize your responses to the user's preferences as much as possible and use friendly " + + "nicknames for cities whenever possible.", + tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] + ); + #endregion + + #region Snippet:StreamingWithAutoFunctionCall_CreateThreadMessage + PersistentAgentThread thread = client.Threads.CreateThread(); + + PersistentThreadMessage message = client.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "What's the weather like in my favorite city?"); + #endregion + + List toolOutputs = new(); + Dictionary toolDelegates = new(); + toolDelegates.Add(nameof(GetWeatherAtLocation), GetWeatherAtLocation); + toolDelegates.Add(nameof(GetCityNickname), GetCityNickname); + toolDelegates.Add(nameof(GetUserFavoriteCity), GetUserFavoriteCity); + AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 10); + + #region Snippet:StreamingWithAutoFunctionCall + CollectionResult stream = client.Runs.CreateRunStreaming(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions); + foreach (StreamingUpdate streamingUpdate in stream) + { + if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) + { + Console.WriteLine("--- Run started! ---"); + } + else if (streamingUpdate is MessageContentUpdate contentUpdate) + { + Console.Write(contentUpdate.Text); + } + else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) + { + Console.WriteLine(); + Console.WriteLine("--- Run completed! ---"); + } + } + #endregion + + #region Snippet:StreamingWithAutoFunctionCall_Cleanup + client.Threads.DeleteThread(thread.Id); + client.Administration.DeleteAgent(agent.Id); + #endregion + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Telemetry.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Telemetry.cs index 963afc6e16e0..017204bbd309 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Telemetry.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Telemetry.cs @@ -30,13 +30,11 @@ public async Task TracingToConsoleExample() var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; #endif - #region Snippet:AgentsTelemetrySetupTracingToConsoleAsync var tracerProvider = Sdk.CreateTracerProviderBuilder() .AddSource("Azure.AI.Agents.Persistent.*") // Add the required sources name .SetResourceBuilder(OpenTelemetry.Resources.ResourceBuilder.CreateDefault().AddService("AgentTracingSample")) .AddConsoleExporter() // Export traces to the console .Build(); - #endregion using (tracerProvider) { @@ -207,12 +205,10 @@ public async Task TracingToAzureMonitorExample() var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; #endif - #region Snippet:AgentsTelemetrySetupTracingToAzureMonitorAsync var tracerProvider = Sdk.CreateTracerProviderBuilder() .AddSource("Azure.AI.Agents.Persistent.*") .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("AgentTracingSample")) .AddAzureMonitorTraceExporter().Build(); - #endregion using (tracerProvider) { diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/Azure.ResourceManager.ArizeAIObservabilityEval.sln b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/Azure.ResourceManager.ArizeAIObservabilityEval.sln index 9b7f9e9d01d2..9e42c13503d3 100644 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/Azure.ResourceManager.ArizeAIObservabilityEval.sln +++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/Azure.ResourceManager.ArizeAIObservabilityEval.sln @@ -7,8 +7,6 @@ Project("{12A709AF-3761-455D-8CD0-2DC507CFB77D}") = "Azure.ResourceManager.Arize EndProject Project("{12A709AF-3761-455D-8CD0-2DC507CFB77D}") = "Azure.ResourceManager.ArizeAIObservabilityEval.Tests", "tests\Azure.ResourceManager.ArizeAIObservabilityEval.Tests.csproj", "{6BD39C42-2CD3-4EFC-AB89-2603B91AA927}" EndProject -Project("{12A709AF-3761-455D-8CD0-2DC507CFB77D}") = "Azure.ResourceManager.ArizeAIObservabilityEval.Samples", "samples\Azure.ResourceManager.ArizeAIObservabilityEval.Samples.csproj", "{C089D605-9881-4BB7-8355-E95DEF659FAF}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Azure.ResourceManager.ArizeAIObservabilityEval.Samples.csproj b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Azure.ResourceManager.ArizeAIObservabilityEval.Samples.csproj deleted file mode 100644 index 932f8cf6e519..000000000000 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Azure.ResourceManager.ArizeAIObservabilityEval.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Generated/Samples/Sample_ArizeAIObservabilityEvalOrganizationCollection.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/tests/Generated/Samples/Sample_ArizeAIObservabilityEvalOrganizationCollection.cs similarity index 100% rename from sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Generated/Samples/Sample_ArizeAIObservabilityEvalOrganizationCollection.cs rename to sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/tests/Generated/Samples/Sample_ArizeAIObservabilityEvalOrganizationCollection.cs diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Generated/Samples/Sample_ArizeAIObservabilityEvalOrganizationResource.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/tests/Generated/Samples/Sample_ArizeAIObservabilityEvalOrganizationResource.cs similarity index 100% rename from sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Generated/Samples/Sample_ArizeAIObservabilityEvalOrganizationResource.cs rename to sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/tests/Generated/Samples/Sample_ArizeAIObservabilityEvalOrganizationResource.cs diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/Azure.ResourceManager.Chaos.sln b/sdk/chaos/Azure.ResourceManager.Chaos/Azure.ResourceManager.Chaos.sln index 70505ac4af0e..e69b31932a50 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/Azure.ResourceManager.Chaos.sln +++ b/sdk/chaos/Azure.ResourceManager.Chaos/Azure.ResourceManager.Chaos.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Chaos EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Chaos.Tests", "tests\Azure.ResourceManager.Chaos.Tests.csproj", "{71B70A12-F92C-4A4E-8449-EFE70248D385}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{D834F7AA-20E1-4A74-8474-6E367332E3EB}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosCapabilityCollection.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosCapabilityCollection.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosCapabilityCollection.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosCapabilityCollection.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosCapabilityMetadataCollection.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosCapabilityMetadataCollection.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosCapabilityMetadataCollection.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosCapabilityMetadataCollection.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosCapabilityMetadataResource.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosCapabilityMetadataResource.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosCapabilityMetadataResource.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosCapabilityMetadataResource.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosCapabilityResource.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosCapabilityResource.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosCapabilityResource.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosCapabilityResource.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosExperimentCollection.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentCollection.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosExperimentCollection.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentCollection.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosExperimentExecutionCollection.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionCollection.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosExperimentExecutionCollection.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionCollection.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosExperimentExecutionResource.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionResource.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosExperimentExecutionResource.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionResource.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosExperimentResource.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentResource.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosExperimentResource.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentResource.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosTargetCollection.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosTargetCollection.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosTargetCollection.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosTargetCollection.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosTargetMetadataCollection.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosTargetMetadataCollection.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosTargetMetadataCollection.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosTargetMetadataCollection.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosTargetMetadataResource.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosTargetMetadataResource.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosTargetMetadataResource.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosTargetMetadataResource.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosTargetResource.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosTargetResource.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_ChaosTargetResource.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosTargetResource.cs diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/chaos/Azure.ResourceManager.Chaos/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/Azure.ResourceManager.CloudHealth.sln b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/Azure.ResourceManager.CloudHealth.sln index b6d4471a9f9d..216fba2bff61 100644 --- a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/Azure.ResourceManager.CloudHealth.sln +++ b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/Azure.ResourceManager.CloudHealth.sln @@ -7,8 +7,6 @@ Project("{D650D12A-9EE4-4B40-93A1-5DA3CF32E4FF}") = "Azure.ResourceManager.Cloud EndProject Project("{D650D12A-9EE4-4B40-93A1-5DA3CF32E4FF}") = "Azure.ResourceManager.CloudHealth.Tests", "tests\Azure.ResourceManager.CloudHealth.Tests.csproj", "{40BB2F75-FA3F-46DC-8E2C-12C6CF9A5CA3}" EndProject -Project("{D650D12A-9EE4-4B40-93A1-5DA3CF32E4FF}") = "Azure.ResourceManager.CloudHealth.Samples", "samples\Azure.ResourceManager.CloudHealth.Samples.csproj", "{6BE92905-D9FD-46BC-8A4D-F5DDC7DC9947}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/CHANGELOG.md b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/CHANGELOG.md index 80f9c3f0cc45..20ca88fd35c2 100644 --- a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/CHANGELOG.md +++ b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.1 (2025-06-20) ### Features Added diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Azure.ResourceManager.CloudHealth.Samples.csproj b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Azure.ResourceManager.CloudHealth.Samples.csproj deleted file mode 100644 index b0ebb3326ada..000000000000 --- a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Azure.ResourceManager.CloudHealth.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/src/Azure.ResourceManager.CloudHealth.csproj b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/src/Azure.ResourceManager.CloudHealth.csproj index 1b4d7d301c9e..ab37c15a0c74 100644 --- a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/src/Azure.ResourceManager.CloudHealth.csproj +++ b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/src/Azure.ResourceManager.CloudHealth.csproj @@ -1,6 +1,6 @@ - + - 1.0.0-beta.1 + 1.0.0-beta.2 Azure.ResourceManager.CloudHealth Azure Resource Manager client SDK for Azure resource provider CloudHealth. azure;management;arm;resource manager;cloudhealth diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelAuthenticationSettingCollection.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelAuthenticationSettingCollection.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelAuthenticationSettingCollection.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelAuthenticationSettingCollection.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelAuthenticationSettingResource.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelAuthenticationSettingResource.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelAuthenticationSettingResource.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelAuthenticationSettingResource.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelCollection.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelCollection.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelCollection.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelCollection.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelDiscoveryRuleCollection.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelDiscoveryRuleCollection.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelDiscoveryRuleCollection.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelDiscoveryRuleCollection.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelDiscoveryRuleResource.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelDiscoveryRuleResource.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelDiscoveryRuleResource.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelDiscoveryRuleResource.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelEntityCollection.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelEntityCollection.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelEntityCollection.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelEntityCollection.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelEntityResource.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelEntityResource.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelEntityResource.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelEntityResource.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelRelationshipCollection.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelRelationshipCollection.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelRelationshipCollection.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelRelationshipCollection.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelRelationshipResource.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelRelationshipResource.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelRelationshipResource.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelRelationshipResource.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelResource.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelResource.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelResource.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelResource.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelSignalDefinitionCollection.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelSignalDefinitionCollection.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelSignalDefinitionCollection.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelSignalDefinitionCollection.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelSignalDefinitionResource.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelSignalDefinitionResource.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_HealthModelSignalDefinitionResource.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_HealthModelSignalDefinitionResource.cs diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/cloudhealth/Azure.ResourceManager.CloudHealth/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/cloudhealth/Azure.ResourceManager.CloudHealth/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/communication/Azure.Communication.Chat/CHANGELOG.md b/sdk/communication/Azure.Communication.Chat/CHANGELOG.md index 0f3c51a7c64a..e238b1916ff8 100644 --- a/sdk/communication/Azure.Communication.Chat/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.Chat/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.5.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.4.0 (2025-06-17) ### Features Added diff --git a/sdk/communication/Azure.Communication.Chat/src/Azure.Communication.Chat.csproj b/sdk/communication/Azure.Communication.Chat/src/Azure.Communication.Chat.csproj index 166e730871be..49487bd6e02a 100644 --- a/sdk/communication/Azure.Communication.Chat/src/Azure.Communication.Chat.csproj +++ b/sdk/communication/Azure.Communication.Chat/src/Azure.Communication.Chat.csproj @@ -7,9 +7,9 @@ Microsoft Azure Communication Chat quickstart - https://docs.microsoft.com/azure/communication-services/quickstarts/chat/get-started?pivots=programming-language-csharp Azure Communication Chat Service - 1.4.0 + 1.5.0-beta.1 - 1.3.1 + 1.4.0 Microsoft Azure Communication Chat Service;Microsoft;Azure;Azure Communication Service;Azure Communication Chat Service;Chat;Communication;$(PackageCommonTags) $(RequiredTargetFrameworks) true diff --git a/sdk/communication/Azure.Communication.Email/api/Azure.Communication.Email.net8.0.cs b/sdk/communication/Azure.Communication.Email/api/Azure.Communication.Email.net8.0.cs index 21a60fcfad63..ca8c1e40b47b 100644 --- a/sdk/communication/Azure.Communication.Email/api/Azure.Communication.Email.net8.0.cs +++ b/sdk/communication/Azure.Communication.Email/api/Azure.Communication.Email.net8.0.cs @@ -132,6 +132,7 @@ public static partial class EmailClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddEmailClient(this TBuilder builder, string connectionString) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddEmailClient(this TBuilder builder, System.Uri serviceUri) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddEmailClient(this TBuilder builder, System.Uri serviceUri, Azure.AzureKeyCredential azureKeyCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddEmailClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/communication/Azure.Communication.Email/src/EmailClientBuilderExtensions.cs b/sdk/communication/Azure.Communication.Email/src/EmailClientBuilderExtensions.cs index 1f6b73e5e176..e2bf61c5f29a 100644 --- a/sdk/communication/Azure.Communication.Email/src/EmailClientBuilderExtensions.cs +++ b/sdk/communication/Azure.Communication.Email/src/EmailClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.Communication.Email; using Azure.Core.Extensions; @@ -43,6 +44,8 @@ public static IAzureClientBuilder AddEmailClien /// /// Registers a instance with the provided /// + [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 AddEmailClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.net8.0.cs b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.net8.0.cs index 495c52853e6b..539c254b2745 100644 --- a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.net8.0.cs +++ b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.net8.0.cs @@ -584,10 +584,12 @@ public static partial class JobRouterClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddJobRouterAdministrationClient(this TBuilder builder, string connectionString) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddJobRouterAdministrationClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddJobRouterAdministrationClient(this TBuilder builder, System.Uri endpoint, Azure.Core.TokenCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddJobRouterAdministrationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddJobRouterClient(this TBuilder builder, string connectionString) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddJobRouterClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddJobRouterClient(this TBuilder builder, System.Uri endpoint, Azure.Core.TokenCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddJobRouterClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } public partial class JobRouterClientOptions : Azure.Core.ClientOptions diff --git a/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClientBuilderExtensions.cs b/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClientBuilderExtensions.cs index 686c4bb7b602..77c5d8e3e98b 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClientBuilderExtensions.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using Azure.Core; using Azure.Core.Extensions; @@ -72,6 +73,8 @@ public static IAzureClientBuilder AddJo /// Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddJobRouterAdministrationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { @@ -80,6 +83,8 @@ public static IAzureClientBuilder Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddJobRouterClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Azure.ResourceManager.ComputeFleet.sln b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Azure.ResourceManager.ComputeFleet.sln index 7a24cf7855ce..8742335f3588 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Azure.ResourceManager.ComputeFleet.sln +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Azure.ResourceManager.ComputeFleet.sln @@ -7,8 +7,6 @@ Project("{4C116B47-8025-4661-8132-7285E6F6A0E6}") = "Azure.ResourceManager.Compu EndProject Project("{4C116B47-8025-4661-8132-7285E6F6A0E6}") = "Azure.ResourceManager.ComputeFleet.Tests", "tests\Azure.ResourceManager.ComputeFleet.Tests.csproj", "{9F3B80CD-FF80-44EC-97AB-E85DC75172E4}" EndProject -Project("{4C116B47-8025-4661-8132-7285E6F6A0E6}") = "Azure.ResourceManager.ComputeFleet.Samples", "samples\Azure.ResourceManager.ComputeFleet.Samples.csproj", "{0E6B34B3-AD10-444F-99D5-EC5ADA5E84E0}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Azure.ResourceManager.ComputeFleet.Samples.csproj b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Azure.ResourceManager.ComputeFleet.Samples.csproj deleted file mode 100644 index 8e80cdeddc94..000000000000 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Azure.ResourceManager.ComputeFleet.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Generated/Samples/Sample_ComputeFleetCollection.cs similarity index 100% rename from sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetCollection.cs rename to sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Generated/Samples/Sample_ComputeFleetCollection.cs diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Generated/Samples/Sample_ComputeFleetResource.cs similarity index 100% rename from sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_ComputeFleetResource.cs rename to sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Generated/Samples/Sample_ComputeFleetResource.cs diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/computefleet/Azure.ResourceManager.ComputeFleet/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/Azure.ResourceManager.ComputeSchedule.sln b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/Azure.ResourceManager.ComputeSchedule.sln index f75db3025df0..dc3bff897d03 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/Azure.ResourceManager.ComputeSchedule.sln +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/Azure.ResourceManager.ComputeSchedule.sln @@ -7,8 +7,6 @@ Project("{0E226CD3-25FE-40E7-B1FA-AD1802210A3E}") = "Azure.ResourceManager.Compu EndProject Project("{0E226CD3-25FE-40E7-B1FA-AD1802210A3E}") = "Azure.ResourceManager.ComputeSchedule.Tests", "tests\Azure.ResourceManager.ComputeSchedule.Tests.csproj", "{A5B31417-952E-4847-BC59-09E9C8603B8C}" EndProject -Project("{0E226CD3-25FE-40E7-B1FA-AD1802210A3E}") = "Azure.ResourceManager.ComputeSchedule.Samples", "samples\Azure.ResourceManager.ComputeSchedule.Samples.csproj", "{FE1DDA4E-EDE2-4DC6-A6BF-9E135C78A7A7}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/samples/Azure.ResourceManager.ComputeSchedule.Samples.csproj b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/samples/Azure.ResourceManager.ComputeSchedule.Samples.csproj deleted file mode 100644 index 816cb046d765..000000000000 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/samples/Azure.ResourceManager.ComputeSchedule.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/Azure.ResourceManager.ConnectedCache.sln b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/Azure.ResourceManager.ConnectedCache.sln index 7ef5e7ca8361..704a61ec7831 100644 --- a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/Azure.ResourceManager.ConnectedCache.sln +++ b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/Azure.ResourceManager.ConnectedCache.sln @@ -7,8 +7,6 @@ Project("{AC8CF66F-B9AE-4DA8-BD00-4F7494135345}") = "Azure.ResourceManager.Conne EndProject Project("{AC8CF66F-B9AE-4DA8-BD00-4F7494135345}") = "Azure.ResourceManager.ConnectedCache.Tests", "tests\Azure.ResourceManager.ConnectedCache.Tests.csproj", "{8E894647-EA2B-4E80-9451-C29874748003}" EndProject -Project("{AC8CF66F-B9AE-4DA8-BD00-4F7494135345}") = "Azure.ResourceManager.ConnectedCache.Samples", "samples\Azure.ResourceManager.ConnectedCache.Samples.csproj", "{BEB16E5F-56DB-4FBA-BBC8-83932C681D96}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Azure.ResourceManager.ConnectedCache.Samples.csproj b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Azure.ResourceManager.ConnectedCache.Samples.csproj deleted file mode 100644 index 786082ab3a7c..000000000000 --- a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Azure.ResourceManager.ConnectedCache.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_EnterpriseMccCacheNodeCollection.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_EnterpriseMccCacheNodeCollection.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_EnterpriseMccCacheNodeCollection.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_EnterpriseMccCacheNodeCollection.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_EnterpriseMccCacheNodeResource.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_EnterpriseMccCacheNodeResource.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_EnterpriseMccCacheNodeResource.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_EnterpriseMccCacheNodeResource.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_EnterpriseMccCustomerCollection.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_EnterpriseMccCustomerCollection.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_EnterpriseMccCustomerCollection.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_EnterpriseMccCustomerCollection.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_EnterpriseMccCustomerResource.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_EnterpriseMccCustomerResource.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_EnterpriseMccCustomerResource.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_EnterpriseMccCustomerResource.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_IspCacheNodeCollection.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_IspCacheNodeCollection.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_IspCacheNodeCollection.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_IspCacheNodeCollection.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_IspCacheNodeResource.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_IspCacheNodeResource.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_IspCacheNodeResource.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_IspCacheNodeResource.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_IspCustomerCollection.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_IspCustomerCollection.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_IspCustomerCollection.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_IspCustomerCollection.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_IspCustomerResource.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_IspCustomerResource.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_IspCustomerResource.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_IspCustomerResource.cs diff --git a/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/connectedcache/Azure.ResourceManager.ConnectedCache/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/connectedcache/Azure.ResourceManager.ConnectedCache/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln index ab24f4d23558..18ccbfce1acc 100644 --- a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln @@ -7,8 +7,6 @@ Project("{9F6E69E7-B27E-43EA-AC7D-D33ACA837984}") = "Azure.ResourceManager.Conta 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 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 deleted file mode 100644 index 63ad3e13ada6..000000000000 --- a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Azure.ResourceManager.ContainerOrchestratorRuntime.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ 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/tests/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs similarity index 100% rename from sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs similarity index 100% rename from sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs similarity index 100% rename from sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs similarity index 100% rename from sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs similarity index 100% rename from sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterServiceResource.cs similarity index 100% rename from sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceResource.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterServiceResource.cs diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs similarity index 100% rename from sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs similarity index 100% rename from sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs rename to sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/tests/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/CHANGELOG.md b/sdk/containerservice/Azure.ResourceManager.ContainerService/CHANGELOG.md index d2bc16a1a809..b305b69d8377 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/CHANGELOG.md +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.2.4 (2025-06-24) ### Bugs Fixed diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Azure.ResourceManager.ContainerService.csproj b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Azure.ResourceManager.ContainerService.csproj index c0bbaf7cbd9f..d5e7f66cfa91 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Azure.ResourceManager.ContainerService.csproj +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Azure.ResourceManager.ContainerService.csproj @@ -1,8 +1,8 @@ - 1.2.4 + 1.3.0-beta.1 - 1.2.3 + 1.2.4 Azure.ResourceManager.ContainerService Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.ContainerService. azure;management;arm;resource manager;containerservice diff --git a/sdk/core/Azure.Core/samples/Diagnostics.md b/sdk/core/Azure.Core/samples/Diagnostics.md index 2133956e369a..d05bbd4eab5d 100644 --- a/sdk/core/Azure.Core/samples/Diagnostics.md +++ b/sdk/core/Azure.Core/samples/Diagnostics.md @@ -256,7 +256,7 @@ Another approach would be to filter out generic HTTP client activities: .WithTracing(tracerProviderBuilder => tracerProviderBuilder .AddSource("Azure.*") .AddHttpClientInstrumentation(o => { - o => o.FilterHttpRequestMessage = (_) => Activity.Current?.Parent?.Source?.Name != "Azure.Core.Http"; + o.FilterHttpRequestMessage = (_) => Activity.Current?.Parent?.Source?.Name != "Azure.Core.Http"; }) ...) ``` diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Azure.ResourceManager.DatabaseWatcher.sln b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Azure.ResourceManager.DatabaseWatcher.sln index 313caa46f33f..9e4e78fa1177 100644 --- a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Azure.ResourceManager.DatabaseWatcher.sln +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Azure.ResourceManager.DatabaseWatcher.sln @@ -2,8 +2,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29709.97 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DatabaseWatcher.Samples", "samples\Azure.ResourceManager.DatabaseWatcher.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DatabaseWatcher", "src\Azure.ResourceManager.DatabaseWatcher.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DatabaseWatcher.Tests", "tests\Azure.ResourceManager.DatabaseWatcher.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherAlertRuleCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherAlertRuleCollection.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherAlertRuleCollection.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherAlertRuleCollection.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherAlertRuleResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherAlertRuleResource.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherAlertRuleResource.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherAlertRuleResource.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherCollection.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherCollection.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherCollection.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherHealthValidationCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherHealthValidationCollection.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherHealthValidationCollection.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherHealthValidationCollection.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherHealthValidationResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherHealthValidationResource.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherHealthValidationResource.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherHealthValidationResource.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherResource.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherResource.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherResource.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherSharedPrivateLinkResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherSharedPrivateLinkResource.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherSharedPrivateLinkResource.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherSharedPrivateLinkResource.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherSharedPrivateLinkResourceCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherSharedPrivateLinkResourceCollection.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherSharedPrivateLinkResourceCollection.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherSharedPrivateLinkResourceCollection.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherTargetCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherTargetCollection.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherTargetCollection.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherTargetCollection.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherTargetResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherTargetResource.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_DatabaseWatcherTargetResource.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_DatabaseWatcherTargetResource.cs diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/Azure.ResourceManager.Dell.Storage.sln b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/Azure.ResourceManager.Dell.Storage.sln index 9fafd7dffa06..78ad6b7bcada 100644 --- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/Azure.ResourceManager.Dell.Storage.sln +++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/Azure.ResourceManager.Dell.Storage.sln @@ -7,8 +7,6 @@ Project("{2FF2E267-F3D1-41F3-A98C-F29A2EEEA743}") = "Azure.ResourceManager.Dell. EndProject Project("{2FF2E267-F3D1-41F3-A98C-F29A2EEEA743}") = "Azure.ResourceManager.Dell.Storage.Tests", "tests\Azure.ResourceManager.Dell.Storage.Tests.csproj", "{9CBD54DC-76C2-4CA0-AD8B-7840C00112B0}" EndProject -Project("{2FF2E267-F3D1-41F3-A98C-F29A2EEEA743}") = "Azure.ResourceManager.Dell.Storage.Samples", "samples\Azure.ResourceManager.Dell.Storage.Samples.csproj", "{31C7027E-4549-48C2-8489-D1F6CD35C5B4}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Azure.ResourceManager.Dell.Storage.Samples.csproj b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Azure.ResourceManager.Dell.Storage.Samples.csproj deleted file mode 100644 index 80128e6aa580..000000000000 --- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Azure.ResourceManager.Dell.Storage.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Generated/Samples/Sample_DellFileSystemCollection.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/tests/Generated/Samples/Sample_DellFileSystemCollection.cs similarity index 100% rename from sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Generated/Samples/Sample_DellFileSystemCollection.cs rename to sdk/dellstorage/Azure.ResourceManager.Dell.Storage/tests/Generated/Samples/Sample_DellFileSystemCollection.cs diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Generated/Samples/Sample_DellFileSystemResource.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/tests/Generated/Samples/Sample_DellFileSystemResource.cs similarity index 100% rename from sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Generated/Samples/Sample_DellFileSystemResource.cs rename to sdk/dellstorage/Azure.ResourceManager.Dell.Storage/tests/Generated/Samples/Sample_DellFileSystemResource.cs diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/dellstorage/Azure.ResourceManager.Dell.Storage/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/dellstorage/Azure.ResourceManager.Dell.Storage/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Azure.ResourceManager.DependencyMap.sln b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Azure.ResourceManager.DependencyMap.sln index 861bbcf0797b..6167e09608de 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Azure.ResourceManager.DependencyMap.sln +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/Azure.ResourceManager.DependencyMap.sln @@ -7,8 +7,6 @@ Project("{B42C2B35-50A7-4E88-8CEA-3131B26AA1F8}") = "Azure.ResourceManager.Depen EndProject Project("{B42C2B35-50A7-4E88-8CEA-3131B26AA1F8}") = "Azure.ResourceManager.DependencyMap.Tests", "tests\Azure.ResourceManager.DependencyMap.Tests.csproj", "{F136E09B-4688-46C2-8929-EAEE2DAED0D1}" EndProject -Project("{B42C2B35-50A7-4E88-8CEA-3131B26AA1F8}") = "Azure.ResourceManager.DependencyMap.Samples", "samples\Azure.ResourceManager.DependencyMap.Samples.csproj", "{E603ACD3-CCE6-4680-B41C-B51DC858E9D3}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Azure.ResourceManager.DependencyMap.Samples.csproj b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Azure.ResourceManager.DependencyMap.Samples.csproj deleted file mode 100644 index 0095e0d50960..000000000000 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Azure.ResourceManager.DependencyMap.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DependencyMapCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapCollection.cs similarity index 100% rename from sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DependencyMapCollection.cs rename to sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapCollection.cs diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DependencyMapDiscoverySourceCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceCollection.cs similarity index 100% rename from sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DependencyMapDiscoverySourceCollection.cs rename to sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceCollection.cs diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DependencyMapDiscoverySourceResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceResource.cs similarity index 100% rename from sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DependencyMapDiscoverySourceResource.cs rename to sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceResource.cs diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DependencyMapResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapResource.cs similarity index 100% rename from sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_DependencyMapResource.cs rename to sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapResource.cs diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/dependencymap/Azure.ResourceManager.DependencyMap/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Azure.ResourceManager.DeviceRegistry.sln b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Azure.ResourceManager.DeviceRegistry.sln index 81fbf8427a8f..0851dbe2e609 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Azure.ResourceManager.DeviceRegistry.sln +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Azure.ResourceManager.DeviceRegistry.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Devic EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DeviceRegistry.Tests", "tests\Azure.ResourceManager.DeviceRegistry.Tests.csproj", "{EE2B83DC-93C8-408A-9754-1D72670DFB97}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DeviceRegistry.Samples", "samples\Azure.ResourceManager.DeviceRegistry.Samples.csproj", "{B912E881-D3EC-46DB-B29F-509F579C182A}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Azure.ResourceManager.DeviceRegistry.Samples.csproj b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Azure.ResourceManager.DeviceRegistry.Samples.csproj deleted file mode 100644 index e66e08636de6..000000000000 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Azure.ResourceManager.DeviceRegistry.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryAssetCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryAssetCollection.cs similarity index 100% rename from sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryAssetCollection.cs rename to sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryAssetCollection.cs diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryAssetEndpointProfileCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryAssetEndpointProfileCollection.cs similarity index 100% rename from sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryAssetEndpointProfileCollection.cs rename to sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryAssetEndpointProfileCollection.cs diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryAssetEndpointProfileResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryAssetEndpointProfileResource.cs similarity index 100% rename from sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryAssetEndpointProfileResource.cs rename to sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryAssetEndpointProfileResource.cs diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryAssetResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryAssetResource.cs similarity index 100% rename from sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryAssetResource.cs rename to sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryAssetResource.cs diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryBillingContainerCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryBillingContainerCollection.cs similarity index 100% rename from sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryBillingContainerCollection.cs rename to sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryBillingContainerCollection.cs diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryBillingContainerResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryBillingContainerResource.cs similarity index 100% rename from sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_DeviceRegistryBillingContainerResource.cs rename to sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_DeviceRegistryBillingContainerResource.cs diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/Azure.ResourceManager.DevOpsInfrastructure.sln b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/Azure.ResourceManager.DevOpsInfrastructure.sln index 62a8b9da9d48..7fa167e4c1eb 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/Azure.ResourceManager.DevOpsInfrastructure.sln +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/Azure.ResourceManager.DevOpsInfrastructure.sln @@ -7,8 +7,6 @@ Project("{01A9F61F-DFCE-4234-AA9C-3576F92E1557}") = "Azure.ResourceManager.DevOp EndProject Project("{01A9F61F-DFCE-4234-AA9C-3576F92E1557}") = "Azure.ResourceManager.DevOpsInfrastructure.Tests", "tests\Azure.ResourceManager.DevOpsInfrastructure.Tests.csproj", "{4F97FBC0-13F8-4D9A-9A4E-3E38A720E3CF}" EndProject -Project("{01A9F61F-DFCE-4234-AA9C-3576F92E1557}") = "Azure.ResourceManager.DevOpsInfrastructure.Samples", "samples\Azure.ResourceManager.DevOpsInfrastructure.Samples.csproj", "{7E91D3E9-33A7-4127-9579-A59BB92D03B7}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Azure.ResourceManager.DevOpsInfrastructure.Samples.csproj b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Azure.ResourceManager.DevOpsInfrastructure.Samples.csproj deleted file mode 100644 index 4cac2deefd6d..000000000000 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Azure.ResourceManager.DevOpsInfrastructure.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tests/Generated/Samples/Sample_DevOpsPoolCollection.cs similarity index 100% rename from sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs rename to sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tests/Generated/Samples/Sample_DevOpsPoolCollection.cs diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tests/Generated/Samples/Sample_DevOpsPoolResource.cs similarity index 100% rename from sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs rename to sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tests/Generated/Samples/Sample_DevOpsPoolResource.cs diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs similarity index 100% rename from sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs rename to sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln b/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln index a86adeb097cd..a49569d71f99 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln @@ -7,8 +7,6 @@ Project("{51D55474-B532-4346-8431-4BA872A1AD11}") = "Azure.ResourceManager.Durab EndProject Project("{51D55474-B532-4346-8431-4BA872A1AD11}") = "Azure.ResourceManager.DurableTask.Tests", "tests\Azure.ResourceManager.DurableTask.Tests.csproj", "{F849C2AA-D6E9-4B9B-B68C-10B2D436AE5E}" EndProject -Project("{51D55474-B532-4346-8431-4BA872A1AD11}") = "Azure.ResourceManager.DurableTask.Samples", "samples\Azure.ResourceManager.DurableTask.Samples.csproj", "{7EA44CAC-5DDC-45C1-8916-E1EB8CE1DEE2}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj deleted file mode 100644 index 3a7a53e60d6a..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubCollection.cs similarity index 100% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskHubCollection.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubCollection.cs diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubResource.cs similarity index 100% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskHubResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubResource.cs diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs similarity index 100% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs similarity index 100% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskSchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerResource.cs similarity index 100% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_DurableTaskSchedulerResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerResource.cs diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/api/Azure.Messaging.EventGrid.Namespaces.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/api/Azure.Messaging.EventGrid.Namespaces.net8.0.cs index cff5a651cbf2..14d8e89d0886 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/api/Azure.Messaging.EventGrid.Namespaces.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/api/Azure.Messaging.EventGrid.Namespaces.net8.0.cs @@ -258,9 +258,11 @@ public static partial class EventGridNamespacesClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, System.Uri endpoint, string topicName, string subscriptionName) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, System.Uri endpoint, string topicName, string subscriptionName, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddEventGridReceiverClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, System.Uri endpoint, string topicName) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, System.Uri endpoint, string topicName, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddEventGridSenderClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridNamespacesClientBuilderExtensions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridNamespacesClientBuilderExtensions.cs index 926a5b80f970..a4cf95293b6f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridNamespacesClientBuilderExtensions.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridNamespacesClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.Core.Extensions; using Azure.Messaging.EventGrid.Namespaces; @@ -67,6 +68,8 @@ public static IAzureClientBuilder Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddEventGridSenderClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { @@ -75,6 +78,8 @@ public static IAzureClientBuilder Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddEventGridReceiverClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md index 690b262ab6a1..7afcb8bc259e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md @@ -1,14 +1,17 @@ # Release History -## 5.0.0-beta.2 (Unreleased) +## 5.0.0 (2025-06-25) ### Features Added -### Breaking Changes +- Added a dependency on the `Azure.Messaging.EventGrid.SystemEvents` package. + The system events are now referenced via type-forwarding. -### Bugs Fixed +### Breaking Changes -### Other Changes +- Various system events have been updated to reflect the actual service behavior. + There are no binary breaks or compilation breaks, but there are behavior breaking changes. For instance, + some properties that were previously incorrectly marked as optional, have been marked as required. ## 5.0.0-beta.1 (2025-06-04) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs index c63231aea522..37e156813a87 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs @@ -73,6 +73,7 @@ public static partial class EventGridPublisherClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridPublisherClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridPublisherClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddEventGridPublisherClient(this TBuilder builder, System.Uri endpoint, Azure.AzureSasCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddEventGridPublisherClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { 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 3dcc276a8684..52176146bab7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj @@ -2,7 +2,7 @@ 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 - 5.0.0-beta.2 + 5.0.0 4.31.0 Microsoft Azure EventGrid;Event Grid;Event Grid Publishing; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Compatibility/EventGridPublisherClientBuilderExtensions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Compatibility/EventGridPublisherClientBuilderExtensions.cs index e810bd41473a..65098001c4ea 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Compatibility/EventGridPublisherClientBuilderExtensions.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Compatibility/EventGridPublisherClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.Core.Extensions; using Azure.Messaging.EventGrid; @@ -45,6 +46,8 @@ public static IAzureClientBuilder /// Registers an 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 AddEventGridPublisherClient( this TBuilder builder, TConfiguration configuration) diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/Azure.ResourceManager.Fabric.sln b/sdk/fabric/Azure.ResourceManager.Fabric/Azure.ResourceManager.Fabric.sln index 1259ca6d92a1..13c825cc0a18 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/Azure.ResourceManager.Fabric.sln +++ b/sdk/fabric/Azure.ResourceManager.Fabric/Azure.ResourceManager.Fabric.sln @@ -7,8 +7,6 @@ Project("{7E83D8BB-DCA4-425E-93A5-B41D71E835A6}") = "Azure.ResourceManager.Fabri EndProject Project("{7E83D8BB-DCA4-425E-93A5-B41D71E835A6}") = "Azure.ResourceManager.Fabric.Tests", "tests\Azure.ResourceManager.Fabric.Tests.csproj", "{2E184395-27A4-451E-90BA-BFEF9D56ACD3}" EndProject -Project("{7E83D8BB-DCA4-425E-93A5-B41D71E835A6}") = "Azure.ResourceManager.Fabric.Samples", "samples\Azure.ResourceManager.Fabric.Samples.csproj", "{6DAF4C0F-4B83-44C0-A185-50D8CEBFDE70}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Azure.ResourceManager.Fabric.Samples.csproj b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Azure.ResourceManager.Fabric.Samples.csproj deleted file mode 100644 index 803a5b39d17e..000000000000 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Azure.ResourceManager.Fabric.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/tests/Generated/Samples/Sample_FabricCapacityCollection.cs similarity index 100% rename from sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs rename to sdk/fabric/Azure.ResourceManager.Fabric/tests/Generated/Samples/Sample_FabricCapacityCollection.cs diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/tests/Generated/Samples/Sample_FabricCapacityResource.cs similarity index 100% rename from sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs rename to sdk/fabric/Azure.ResourceManager.Fabric/tests/Generated/Samples/Sample_FabricCapacityResource.cs diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/fabric/Azure.ResourceManager.Fabric/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/fabric/Azure.ResourceManager.Fabric/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/api/Azure.AI.FormRecognizer.net8.0.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/api/Azure.AI.FormRecognizer.net8.0.cs index 8d904e406fec..2a0b04842b55 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/api/Azure.AI.FormRecognizer.net8.0.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/api/Azure.AI.FormRecognizer.net8.0.cs @@ -1634,12 +1634,14 @@ public static partial class DocumentAnalysisClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } public static partial class FormRecognizerClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddFormRecognizerClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddFormRecognizerClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddFormRecognizerClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisClientBuilderExtensions.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisClientBuilderExtensions.cs index 7b041c07aa66..8ff565dc24fb 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisClientBuilderExtensions.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.AI.FormRecognizer.DocumentAnalysis; using Azure.Core.Extensions; @@ -34,6 +35,8 @@ public static IAzureClientBuilder /// Registers a 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 AddDocumentAnalysisClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerClientBuilderExtensions.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerClientBuilderExtensions.cs index 152504b25560..678655abb576 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerClientBuilderExtensions.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormRecognizerClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.AI.FormRecognizer; using Azure.Core.Extensions; @@ -34,6 +35,8 @@ public static IAzureClientBuilder /// Registers a 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 AddFormRecognizerClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/Azure.ResourceManager.Grafana.sln b/sdk/grafana/Azure.ResourceManager.Grafana/Azure.ResourceManager.Grafana.sln index f5878b1f0f01..c7fb03e7d4fe 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/Azure.ResourceManager.Grafana.sln +++ b/sdk/grafana/Azure.ResourceManager.Grafana/Azure.ResourceManager.Grafana.sln @@ -1,13 +1,19 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.6.33829.357 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Grafana", "src\Azure.ResourceManager.Grafana.csproj", "{FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}" +Project("{C87DDD0F-A96D-4E9A-9F5C-0260760719A0}") = "Azure.ResourceManager.Grafana", "src\Azure.ResourceManager.Grafana.csproj", "{F428B24E-8450-43CC-9025-14225FD1D135}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Grafana.Tests", "tests\Azure.ResourceManager.Grafana.Tests.csproj", "{B930A63B-F1E7-4424-B295-F615A49C754C}" +Project("{C87DDD0F-A96D-4E9A-9F5C-0260760719A0}") = "Azure.ResourceManager.Grafana.Tests", "tests\Azure.ResourceManager.Grafana.Tests.csproj", "{5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}" EndProject Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D42D36C6-6754-4E9E-B969-DA08674DDF13} + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 @@ -17,35 +23,41 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Debug|x64.ActiveCfg = Debug|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Debug|x64.Build.0 = Debug|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Debug|x86.ActiveCfg = Debug|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Debug|x86.Build.0 = Debug|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Release|Any CPU.Build.0 = Release|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Release|x64.ActiveCfg = Release|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Release|x64.Build.0 = Release|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Release|x86.ActiveCfg = Release|Any CPU - {FB8B9D7A-0574-48A7-ADB2-F4C97A554C26}.Release|x86.Build.0 = Release|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Debug|x64.ActiveCfg = Debug|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Debug|x64.Build.0 = Debug|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Debug|x86.ActiveCfg = Debug|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Debug|x86.Build.0 = Debug|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Release|Any CPU.Build.0 = Release|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Release|x64.ActiveCfg = Release|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Release|x64.Build.0 = Release|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Release|x86.ActiveCfg = Release|Any CPU - {B930A63B-F1E7-4424-B295-F615A49C754C}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {B89FA2D4-0D27-4198-9A0A-DAD16B31621F} + {F428B24E-8450-43CC-9025-14225FD1D135}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Debug|x64.ActiveCfg = Debug|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Debug|x64.Build.0 = Debug|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Debug|x86.ActiveCfg = Debug|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Debug|x86.Build.0 = Debug|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Release|Any CPU.Build.0 = Release|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Release|x64.ActiveCfg = Release|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Release|x64.Build.0 = Release|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Release|x86.ActiveCfg = Release|Any CPU + {F428B24E-8450-43CC-9025-14225FD1D135}.Release|x86.Build.0 = Release|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Debug|x64.ActiveCfg = Debug|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Debug|x64.Build.0 = Debug|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Debug|x86.ActiveCfg = Debug|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Debug|x86.Build.0 = Debug|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Release|Any CPU.Build.0 = Release|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Release|x64.ActiveCfg = Release|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Release|x64.Build.0 = Release|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Release|x86.ActiveCfg = Release|Any CPU + {5BC4A754-A3D7-4439-97FF-D3A1AB8147CD}.Release|x86.Build.0 = Release|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Debug|x64.ActiveCfg = Debug|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Debug|x64.Build.0 = Debug|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Debug|x86.Build.0 = Debug|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Release|Any CPU.Build.0 = Release|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Release|x64.ActiveCfg = Release|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Release|x64.Build.0 = Release|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Release|x86.ActiveCfg = Release|Any CPU + {D3C8CC4B-231E-4116-A3C1-1A72CEC161AA}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/CHANGELOG.md b/sdk/grafana/Azure.ResourceManager.Grafana/CHANGELOG.md index b5de8cf967b2..8fcc4ff942ea 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/CHANGELOG.md +++ b/sdk/grafana/Azure.ResourceManager.Grafana/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.2 (Unreleased) ### Features Added @@ -10,12 +10,19 @@ ### Other Changes +## 1.2.0-beta.1 (2025-06-24) + +### Features Added + +- Upgraded API version to 2024-11-01-preview. + ## 1.1.1 (2025-03-11) ### 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. +- Customization for TSP Generation to keep `public IList RequiredZoneNames { get; }`. ## 1.1.0 (2023-11-29) @@ -30,15 +37,17 @@ ## 1.1.0-beta.2 (2023-11-15) ### Features Added -- Configure grafana enterprise -- Configure SMTP -- Configure grafana plugins -- Configure grafana major version -- Specify SKU (pricing plan) -- Support for private endpoint and managed private endpoint + +- Configure grafana enterprise. +- Configure SMTP. +- Configure grafana plugins. +- Configure grafana major version. +- Specify SKU (pricing plan). +- Support for private endpoint and managed private endpoint. ### Other Changes -- Upgraded API version to 2023-09-01 + +- Upgraded API version to 2023-09-01. ## 1.1.0-beta.1 (2023-05-30) @@ -78,7 +87,7 @@ Polishing since last public beta release: ### Other Changes -- Upgraded dependent `Azure.ResourceManager` to 1.3.0 +- Upgraded dependent `Azure.ResourceManager` to 1.3.0. ## 1.0.0-beta.2 (2022-07-12) @@ -88,8 +97,8 @@ Polishing since last public beta release: ### Other Changes -- Upgraded dependent `Azure.ResourceManager` to 1.2.0 -- Upgraded dependent `Azure.Core` to 1.25.0 +- Upgraded dependent `Azure.ResourceManager` to 1.2.0. +- Upgraded dependent `Azure.Core` to 1.25.0. ## 1.0.0-beta.1 (2022-04-14) diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.net8.0.cs b/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.net8.0.cs index f214fd78a00a..6dee71aca4a5 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.net8.0.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.net8.0.cs @@ -8,8 +8,15 @@ internal AzureResourceManagerGrafanaContext() { } } public static partial class GrafanaExtensions { + public static Azure.ResourceManager.Grafana.GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionResource GetGrafanaPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Grafana.GrafanaPrivateLinkResource GetGrafanaPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetManagedDashboard(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetManagedDashboardAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Grafana.ManagedDashboardResource GetManagedDashboardResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Grafana.ManagedDashboardCollection GetManagedDashboards(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetManagedDashboards(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetManagedDashboardsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetManagedGrafana(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetManagedGrafanaAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Grafana.ManagedGrafanaResource GetManagedGrafanaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -18,6 +25,59 @@ public static partial class GrafanaExtensions public static Azure.AsyncPageable GetManagedGrafanasAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Grafana.ManagedPrivateEndpointModelResource GetManagedPrivateEndpointModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } + public partial class GrafanaIntegrationFabricCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GrafanaIntegrationFabricCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string integrationFabricName, Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string integrationFabricName, Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string integrationFabricName, 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 integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string integrationFabricName, 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 GrafanaIntegrationFabricData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaIntegrationFabricData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData 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 GrafanaIntegrationFabricResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GrafanaIntegrationFabricResource() { } + public virtual Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData 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 workspaceName, string integrationFabricName) { 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.Grafana.GrafanaIntegrationFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData 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.Grafana.Models.GrafanaIntegrationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class GrafanaPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected GrafanaPrivateEndpointConnectionCollection() { } @@ -100,10 +160,13 @@ protected GrafanaPrivateLinkResourceCollection() { } } public partial class GrafanaPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public GrafanaPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? ProvisioningState { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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.Grafana.GrafanaPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -112,6 +175,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 ManagedDashboardCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ManagedDashboardCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dashboardName, Azure.ResourceManager.Grafana.ManagedDashboardData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dashboardName, Azure.ResourceManager.Grafana.ManagedDashboardData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dashboardName, 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 dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dashboardName, 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 ManagedDashboardData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedDashboardData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.ManagedDashboardData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.ManagedDashboardData 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 ManagedDashboardResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ManagedDashboardResource() { } + public virtual Azure.ResourceManager.Grafana.ManagedDashboardData 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 dashboardName) { 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.Grafana.ManagedDashboardData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.ManagedDashboardData 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.Grafana.Models.ManagedDashboardPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Grafana.Models.ManagedDashboardPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ManagedGrafanaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ManagedGrafanaCollection() { } @@ -159,6 +275,9 @@ protected ManagedGrafanaResource() { } public virtual Azure.AsyncPageable FetchAvailablePluginsAsync(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 GetGrafanaIntegrationFabric(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGrafanaIntegrationFabricAsync(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Grafana.GrafanaIntegrationFabricCollection GetGrafanaIntegrationFabrics() { throw null; } public virtual Azure.Response GetGrafanaPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetGrafanaPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionCollection GetGrafanaPrivateEndpointConnections() { throw null; } @@ -248,14 +367,19 @@ namespace Azure.ResourceManager.Grafana.Mocking public partial class MockableGrafanaArmClient : Azure.ResourceManager.ArmResource { protected MockableGrafanaArmClient() { } + public virtual Azure.ResourceManager.Grafana.GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionResource GetGrafanaPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Grafana.GrafanaPrivateLinkResource GetGrafanaPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Grafana.ManagedDashboardResource GetManagedDashboardResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Grafana.ManagedGrafanaResource GetManagedGrafanaResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Grafana.ManagedPrivateEndpointModelResource GetManagedPrivateEndpointModelResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableGrafanaResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableGrafanaResourceGroupResource() { } + public virtual Azure.Response GetManagedDashboard(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetManagedDashboardAsync(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Grafana.ManagedDashboardCollection GetManagedDashboards() { throw null; } public virtual Azure.Response GetManagedGrafana(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetManagedGrafanaAsync(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Grafana.ManagedGrafanaCollection GetManagedGrafanas() { throw null; } @@ -263,6 +387,8 @@ protected MockableGrafanaResourceGroupResource() { } public partial class MockableGrafanaSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableGrafanaSubscriptionResource() { } + public virtual Azure.Pageable GetManagedDashboards(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetManagedDashboardsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetManagedGrafanas(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetManagedGrafanasAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -273,11 +399,17 @@ public static partial class ArmGrafanaModelFactory { public static Azure.ResourceManager.Grafana.Models.EnterpriseDetails EnterpriseDetails(Azure.ResourceManager.Grafana.Models.SaasSubscriptionDetails saasSubscriptionDetails = null, Azure.ResourceManager.Grafana.Models.MarketplaceTrialQuota marketplaceTrialQuota = null) { throw null; } public static Azure.ResourceManager.Grafana.Models.GrafanaAvailablePlugin GrafanaAvailablePlugin(string pluginId = null, string name = null) { throw null; } + public static Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData GrafanaIntegrationFabricData(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.Grafana.Models.GrafanaIntegrationFabricProperties properties = null) { throw null; } + public static Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricProperties GrafanaIntegrationFabricProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), Azure.Core.ResourceIdentifier targetResourceId = null, Azure.Core.ResourceIdentifier dataSourceResourceId = null, System.Collections.Generic.IEnumerable scenarios = null) { throw null; } public static Azure.ResourceManager.Grafana.Models.GrafanaPlugin GrafanaPlugin(string pluginId = null) { throw null; } public static Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionData GrafanaPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Grafana.Models.GrafanaPrivateLinkServiceConnectionState connectionState = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.ResourceManager.Grafana.Models.GrafanaPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaPrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.Grafana.GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.Grafana.ManagedDashboardData ManagedDashboardData(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.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?)) { throw null; } public static Azure.ResourceManager.Grafana.ManagedGrafanaData ManagedGrafanaData(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 skuName = null, Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties ManagedGrafanaProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), string grafanaVersion = null, string endpoint = null, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess?), Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy?), Azure.ResourceManager.Grafana.Models.GrafanaApiKey? apiKey = default(Azure.ResourceManager.Grafana.Models.GrafanaApiKey?), Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? deterministicOutboundIP = default(Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP?), System.Collections.Generic.IEnumerable outboundIPs = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope?), System.Collections.Generic.IEnumerable monitorWorkspaceIntegrations = null, Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations enterpriseConfigurations = null, Azure.ResourceManager.Grafana.Models.Smtp grafanaConfigurationsSmtp = null, System.Collections.Generic.IDictionary grafanaPlugins = null, string grafanaMajorVersion = null) { throw null; } + public static Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties ManagedGrafanaProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), string grafanaVersion = null, string endpoint = null, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess?), Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy?), Azure.ResourceManager.Grafana.Models.GrafanaApiKey? apiKey = default(Azure.ResourceManager.Grafana.Models.GrafanaApiKey?), Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? deterministicOutboundIP = default(Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP?), System.Collections.Generic.IEnumerable outboundIPs = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope?), System.Collections.Generic.IEnumerable monitorWorkspaceIntegrations = null, Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations enterpriseConfigurations = null, Azure.ResourceManager.Grafana.Models.GrafanaConfigurations grafanaConfigurations = null, System.Collections.Generic.IDictionary grafanaPlugins = null, string grafanaMajorVersion = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release.", false)] + public static Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties ManagedGrafanaProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState, string grafanaVersion, string endpoint, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy? zoneRedundancy, Azure.ResourceManager.Grafana.Models.GrafanaApiKey? apiKey, Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? deterministicOutboundIP, System.Collections.Generic.IEnumerable outboundIPs, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, System.Collections.Generic.IEnumerable monitorWorkspaceIntegrations, Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations enterpriseConfigurations, Azure.ResourceManager.Grafana.Models.Smtp grafanaConfigurationsSmtp, System.Collections.Generic.IDictionary grafanaPlugins, string grafanaMajorVersion) { throw null; } public static Azure.ResourceManager.Grafana.Models.ManagedPrivateEndpointConnectionState ManagedPrivateEndpointConnectionState(Azure.ResourceManager.Grafana.Models.ManagedPrivateEndpointConnectionStatus? status = default(Azure.ResourceManager.Grafana.Models.ManagedPrivateEndpointConnectionStatus?), string description = null) { throw null; } public static Azure.ResourceManager.Grafana.ManagedPrivateEndpointModelData ManagedPrivateEndpointModelData(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.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), Azure.Core.ResourceIdentifier privateLinkResourceId = null, string privateLinkResourceRegion = null, System.Collections.Generic.IEnumerable groupIds = null, string requestMessage = null, Azure.ResourceManager.Grafana.Models.ManagedPrivateEndpointConnectionState connectionState = null, System.Uri privateLinkServiceUri = null, string privateLinkServicePrivateIP = null) { throw null; } public static Azure.ResourceManager.Grafana.Models.MarketplaceTrialQuota MarketplaceTrialQuota(Azure.ResourceManager.Grafana.Models.AvailablePromotion? availablePromotion = default(Azure.ResourceManager.Grafana.Models.AvailablePromotion?), Azure.Core.ResourceIdentifier grafanaResourceId = null, System.DateTimeOffset? trialStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? trialEndOn = default(System.DateTimeOffset?)) { throw null; } @@ -391,6 +523,47 @@ 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 GrafanaConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaConfigurations() { } + public bool? IsCaptureEnabled { get { throw null; } set { } } + public bool? IsCsrfAlwaysCheckEnabled { get { throw null; } set { } } + public bool? IsExternalEnabled { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaSmtpSettings Smtp { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaUserSettings Users { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaConfigurations 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 GrafanaIntegrationFabricPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaIntegrationFabricPatch() { } + public System.Collections.Generic.IList IntegrationFabricPropertiesUpdateParametersScenarios { 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.Grafana.Models.GrafanaIntegrationFabricPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricPatch 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 GrafanaIntegrationFabricProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaIntegrationFabricProperties() { } + public Azure.Core.ResourceIdentifier DataSourceResourceId { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Scenarios { get { throw null; } } + 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.Grafana.Models.GrafanaIntegrationFabricProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricProperties 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 GrafanaPlugin : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GrafanaPlugin() { } @@ -497,6 +670,55 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess left, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess right) { throw null; } public override string ToString() { throw null; } } + public partial class GrafanaSmtpSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaSmtpSettings() { } + public string FromAddress { get { throw null; } set { } } + public string FromName { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public bool? SkipVerify { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy? StartTLSPolicy { get { throw null; } set { } } + public string User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaSmtpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaSmtpSettings 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 GrafanaStartTlsPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GrafanaStartTlsPolicy(string value) { throw null; } + public static Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy MandatoryStartTls { get { throw null; } } + public static Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy NoStartTls { get { throw null; } } + public static Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy OpportunisticStartTls { get { throw null; } } + public bool Equals(Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy 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.Grafana.Models.GrafanaStartTlsPolicy left, Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy left, Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GrafanaUserSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaUserSettings() { } + public bool? EditorsCanAdmin { get { throw null; } set { } } + public bool? ViewersCanEdit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaUserSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaUserSettings 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 GrafanaZoneRedundancy : System.IEquatable { @@ -515,6 +737,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy left, Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy right) { throw null; } public override string ToString() { throw null; } } + public partial class ManagedDashboardPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedDashboardPatch() { } + 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.Grafana.Models.ManagedDashboardPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.ManagedDashboardPatch 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 ManagedGrafanaPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedGrafanaPatch() { } @@ -535,6 +768,9 @@ public ManagedGrafanaPatchProperties() { } public Azure.ResourceManager.Grafana.Models.GrafanaApiKey? ApiKey { get { throw null; } set { } } public Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? DeterministicOutboundIP { get { throw null; } set { } } public Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations EnterpriseConfigurations { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaConfigurations GrafanaConfigurations { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release.", false)] public Azure.ResourceManager.Grafana.Models.Smtp GrafanaConfigurationsSmtp { get { throw null; } set { } } public string GrafanaMajorVersion { get { throw null; } set { } } public System.Collections.Generic.IDictionary GrafanaPlugins { get { throw null; } } @@ -556,6 +792,9 @@ public ManagedGrafanaProperties() { } public Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? DeterministicOutboundIP { get { throw null; } set { } } public string Endpoint { get { throw null; } } public Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations EnterpriseConfigurations { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaConfigurations GrafanaConfigurations { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release.", false)] public Azure.ResourceManager.Grafana.Models.Smtp GrafanaConfigurationsSmtp { get { throw null; } set { } } public string GrafanaMajorVersion { get { throw null; } set { } } public System.Collections.Generic.IDictionary GrafanaPlugins { get { throw null; } } @@ -673,6 +912,8 @@ 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This class is obsolete and will be removed in a future release", false)] public partial class Smtp : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public Smtp() { } @@ -691,6 +932,8 @@ 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This struct is obsolete and will be removed in a future release", false)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct StartTLSPolicy : System.IEquatable { diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.netstandard2.0.cs b/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.netstandard2.0.cs index f214fd78a00a..6dee71aca4a5 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.netstandard2.0.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/api/Azure.ResourceManager.Grafana.netstandard2.0.cs @@ -8,8 +8,15 @@ internal AzureResourceManagerGrafanaContext() { } } public static partial class GrafanaExtensions { + public static Azure.ResourceManager.Grafana.GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionResource GetGrafanaPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Grafana.GrafanaPrivateLinkResource GetGrafanaPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetManagedDashboard(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetManagedDashboardAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Grafana.ManagedDashboardResource GetManagedDashboardResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Grafana.ManagedDashboardCollection GetManagedDashboards(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetManagedDashboards(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetManagedDashboardsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetManagedGrafana(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetManagedGrafanaAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Grafana.ManagedGrafanaResource GetManagedGrafanaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -18,6 +25,59 @@ public static partial class GrafanaExtensions public static Azure.AsyncPageable GetManagedGrafanasAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Grafana.ManagedPrivateEndpointModelResource GetManagedPrivateEndpointModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } + public partial class GrafanaIntegrationFabricCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GrafanaIntegrationFabricCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string integrationFabricName, Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string integrationFabricName, Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string integrationFabricName, 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 integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string integrationFabricName, 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 GrafanaIntegrationFabricData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaIntegrationFabricData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData 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 GrafanaIntegrationFabricResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GrafanaIntegrationFabricResource() { } + public virtual Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData 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 workspaceName, string integrationFabricName) { 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.Grafana.GrafanaIntegrationFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData 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.Grafana.Models.GrafanaIntegrationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class GrafanaPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected GrafanaPrivateEndpointConnectionCollection() { } @@ -100,10 +160,13 @@ protected GrafanaPrivateLinkResourceCollection() { } } public partial class GrafanaPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public GrafanaPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? ProvisioningState { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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.Grafana.GrafanaPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -112,6 +175,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 ManagedDashboardCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ManagedDashboardCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dashboardName, Azure.ResourceManager.Grafana.ManagedDashboardData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dashboardName, Azure.ResourceManager.Grafana.ManagedDashboardData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dashboardName, 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 dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dashboardName, 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 ManagedDashboardData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedDashboardData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.ManagedDashboardData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.ManagedDashboardData 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 ManagedDashboardResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ManagedDashboardResource() { } + public virtual Azure.ResourceManager.Grafana.ManagedDashboardData 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 dashboardName) { 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.Grafana.ManagedDashboardData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.ManagedDashboardData 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.Grafana.Models.ManagedDashboardPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Grafana.Models.ManagedDashboardPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ManagedGrafanaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ManagedGrafanaCollection() { } @@ -159,6 +275,9 @@ protected ManagedGrafanaResource() { } public virtual Azure.AsyncPageable FetchAvailablePluginsAsync(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 GetGrafanaIntegrationFabric(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGrafanaIntegrationFabricAsync(string integrationFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Grafana.GrafanaIntegrationFabricCollection GetGrafanaIntegrationFabrics() { throw null; } public virtual Azure.Response GetGrafanaPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetGrafanaPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionCollection GetGrafanaPrivateEndpointConnections() { throw null; } @@ -248,14 +367,19 @@ namespace Azure.ResourceManager.Grafana.Mocking public partial class MockableGrafanaArmClient : Azure.ResourceManager.ArmResource { protected MockableGrafanaArmClient() { } + public virtual Azure.ResourceManager.Grafana.GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionResource GetGrafanaPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Grafana.GrafanaPrivateLinkResource GetGrafanaPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Grafana.ManagedDashboardResource GetManagedDashboardResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Grafana.ManagedGrafanaResource GetManagedGrafanaResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Grafana.ManagedPrivateEndpointModelResource GetManagedPrivateEndpointModelResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableGrafanaResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableGrafanaResourceGroupResource() { } + public virtual Azure.Response GetManagedDashboard(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetManagedDashboardAsync(string dashboardName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Grafana.ManagedDashboardCollection GetManagedDashboards() { throw null; } public virtual Azure.Response GetManagedGrafana(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetManagedGrafanaAsync(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Grafana.ManagedGrafanaCollection GetManagedGrafanas() { throw null; } @@ -263,6 +387,8 @@ protected MockableGrafanaResourceGroupResource() { } public partial class MockableGrafanaSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableGrafanaSubscriptionResource() { } + public virtual Azure.Pageable GetManagedDashboards(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetManagedDashboardsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetManagedGrafanas(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetManagedGrafanasAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -273,11 +399,17 @@ public static partial class ArmGrafanaModelFactory { public static Azure.ResourceManager.Grafana.Models.EnterpriseDetails EnterpriseDetails(Azure.ResourceManager.Grafana.Models.SaasSubscriptionDetails saasSubscriptionDetails = null, Azure.ResourceManager.Grafana.Models.MarketplaceTrialQuota marketplaceTrialQuota = null) { throw null; } public static Azure.ResourceManager.Grafana.Models.GrafanaAvailablePlugin GrafanaAvailablePlugin(string pluginId = null, string name = null) { throw null; } + public static Azure.ResourceManager.Grafana.GrafanaIntegrationFabricData GrafanaIntegrationFabricData(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.Grafana.Models.GrafanaIntegrationFabricProperties properties = null) { throw null; } + public static Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricProperties GrafanaIntegrationFabricProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), Azure.Core.ResourceIdentifier targetResourceId = null, Azure.Core.ResourceIdentifier dataSourceResourceId = null, System.Collections.Generic.IEnumerable scenarios = null) { throw null; } public static Azure.ResourceManager.Grafana.Models.GrafanaPlugin GrafanaPlugin(string pluginId = null) { throw null; } public static Azure.ResourceManager.Grafana.GrafanaPrivateEndpointConnectionData GrafanaPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Grafana.Models.GrafanaPrivateLinkServiceConnectionState connectionState = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.ResourceManager.Grafana.Models.GrafanaPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaPrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.Grafana.GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.Grafana.ManagedDashboardData ManagedDashboardData(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.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?)) { throw null; } public static Azure.ResourceManager.Grafana.ManagedGrafanaData ManagedGrafanaData(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 skuName = null, Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties ManagedGrafanaProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), string grafanaVersion = null, string endpoint = null, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess?), Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy?), Azure.ResourceManager.Grafana.Models.GrafanaApiKey? apiKey = default(Azure.ResourceManager.Grafana.Models.GrafanaApiKey?), Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? deterministicOutboundIP = default(Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP?), System.Collections.Generic.IEnumerable outboundIPs = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope?), System.Collections.Generic.IEnumerable monitorWorkspaceIntegrations = null, Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations enterpriseConfigurations = null, Azure.ResourceManager.Grafana.Models.Smtp grafanaConfigurationsSmtp = null, System.Collections.Generic.IDictionary grafanaPlugins = null, string grafanaMajorVersion = null) { throw null; } + public static Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties ManagedGrafanaProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), string grafanaVersion = null, string endpoint = null, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess?), Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy?), Azure.ResourceManager.Grafana.Models.GrafanaApiKey? apiKey = default(Azure.ResourceManager.Grafana.Models.GrafanaApiKey?), Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? deterministicOutboundIP = default(Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP?), System.Collections.Generic.IEnumerable outboundIPs = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope?), System.Collections.Generic.IEnumerable monitorWorkspaceIntegrations = null, Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations enterpriseConfigurations = null, Azure.ResourceManager.Grafana.Models.GrafanaConfigurations grafanaConfigurations = null, System.Collections.Generic.IDictionary grafanaPlugins = null, string grafanaMajorVersion = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release.", false)] + public static Azure.ResourceManager.Grafana.Models.ManagedGrafanaProperties ManagedGrafanaProperties(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? provisioningState, string grafanaVersion, string endpoint, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy? zoneRedundancy, Azure.ResourceManager.Grafana.Models.GrafanaApiKey? apiKey, Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? deterministicOutboundIP, System.Collections.Generic.IEnumerable outboundIPs, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.Grafana.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, System.Collections.Generic.IEnumerable monitorWorkspaceIntegrations, Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations enterpriseConfigurations, Azure.ResourceManager.Grafana.Models.Smtp grafanaConfigurationsSmtp, System.Collections.Generic.IDictionary grafanaPlugins, string grafanaMajorVersion) { throw null; } public static Azure.ResourceManager.Grafana.Models.ManagedPrivateEndpointConnectionState ManagedPrivateEndpointConnectionState(Azure.ResourceManager.Grafana.Models.ManagedPrivateEndpointConnectionStatus? status = default(Azure.ResourceManager.Grafana.Models.ManagedPrivateEndpointConnectionStatus?), string description = null) { throw null; } public static Azure.ResourceManager.Grafana.ManagedPrivateEndpointModelData ManagedPrivateEndpointModelData(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.Grafana.Models.GrafanaProvisioningState? provisioningState = default(Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState?), Azure.Core.ResourceIdentifier privateLinkResourceId = null, string privateLinkResourceRegion = null, System.Collections.Generic.IEnumerable groupIds = null, string requestMessage = null, Azure.ResourceManager.Grafana.Models.ManagedPrivateEndpointConnectionState connectionState = null, System.Uri privateLinkServiceUri = null, string privateLinkServicePrivateIP = null) { throw null; } public static Azure.ResourceManager.Grafana.Models.MarketplaceTrialQuota MarketplaceTrialQuota(Azure.ResourceManager.Grafana.Models.AvailablePromotion? availablePromotion = default(Azure.ResourceManager.Grafana.Models.AvailablePromotion?), Azure.Core.ResourceIdentifier grafanaResourceId = null, System.DateTimeOffset? trialStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? trialEndOn = default(System.DateTimeOffset?)) { throw null; } @@ -391,6 +523,47 @@ 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 GrafanaConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaConfigurations() { } + public bool? IsCaptureEnabled { get { throw null; } set { } } + public bool? IsCsrfAlwaysCheckEnabled { get { throw null; } set { } } + public bool? IsExternalEnabled { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaSmtpSettings Smtp { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaUserSettings Users { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaConfigurations 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 GrafanaIntegrationFabricPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaIntegrationFabricPatch() { } + public System.Collections.Generic.IList IntegrationFabricPropertiesUpdateParametersScenarios { 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.Grafana.Models.GrafanaIntegrationFabricPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricPatch 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 GrafanaIntegrationFabricProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaIntegrationFabricProperties() { } + public Azure.Core.ResourceIdentifier DataSourceResourceId { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Scenarios { get { throw null; } } + 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.Grafana.Models.GrafanaIntegrationFabricProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaIntegrationFabricProperties 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 GrafanaPlugin : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GrafanaPlugin() { } @@ -497,6 +670,55 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess left, Azure.ResourceManager.Grafana.Models.GrafanaPublicNetworkAccess right) { throw null; } public override string ToString() { throw null; } } + public partial class GrafanaSmtpSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaSmtpSettings() { } + public string FromAddress { get { throw null; } set { } } + public string FromName { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public bool? SkipVerify { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy? StartTLSPolicy { get { throw null; } set { } } + public string User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaSmtpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaSmtpSettings 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 GrafanaStartTlsPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GrafanaStartTlsPolicy(string value) { throw null; } + public static Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy MandatoryStartTls { get { throw null; } } + public static Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy NoStartTls { get { throw null; } } + public static Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy OpportunisticStartTls { get { throw null; } } + public bool Equals(Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy 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.Grafana.Models.GrafanaStartTlsPolicy left, Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy left, Azure.ResourceManager.Grafana.Models.GrafanaStartTlsPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GrafanaUserSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GrafanaUserSettings() { } + public bool? EditorsCanAdmin { get { throw null; } set { } } + public bool? ViewersCanEdit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaUserSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.GrafanaUserSettings 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 GrafanaZoneRedundancy : System.IEquatable { @@ -515,6 +737,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy left, Azure.ResourceManager.Grafana.Models.GrafanaZoneRedundancy right) { throw null; } public override string ToString() { throw null; } } + public partial class ManagedDashboardPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedDashboardPatch() { } + 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.Grafana.Models.ManagedDashboardPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Grafana.Models.ManagedDashboardPatch 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 ManagedGrafanaPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedGrafanaPatch() { } @@ -535,6 +768,9 @@ public ManagedGrafanaPatchProperties() { } public Azure.ResourceManager.Grafana.Models.GrafanaApiKey? ApiKey { get { throw null; } set { } } public Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? DeterministicOutboundIP { get { throw null; } set { } } public Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations EnterpriseConfigurations { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaConfigurations GrafanaConfigurations { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release.", false)] public Azure.ResourceManager.Grafana.Models.Smtp GrafanaConfigurationsSmtp { get { throw null; } set { } } public string GrafanaMajorVersion { get { throw null; } set { } } public System.Collections.Generic.IDictionary GrafanaPlugins { get { throw null; } } @@ -556,6 +792,9 @@ public ManagedGrafanaProperties() { } public Azure.ResourceManager.Grafana.Models.DeterministicOutboundIP? DeterministicOutboundIP { get { throw null; } set { } } public string Endpoint { get { throw null; } } public Azure.ResourceManager.Grafana.Models.EnterpriseConfigurations EnterpriseConfigurations { get { throw null; } set { } } + public Azure.ResourceManager.Grafana.Models.GrafanaConfigurations GrafanaConfigurations { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release.", false)] public Azure.ResourceManager.Grafana.Models.Smtp GrafanaConfigurationsSmtp { get { throw null; } set { } } public string GrafanaMajorVersion { get { throw null; } set { } } public System.Collections.Generic.IDictionary GrafanaPlugins { get { throw null; } } @@ -673,6 +912,8 @@ 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This class is obsolete and will be removed in a future release", false)] public partial class Smtp : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public Smtp() { } @@ -691,6 +932,8 @@ 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This struct is obsolete and will be removed in a future release", false)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct StartTLSPolicy : System.IEquatable { diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/assets.json b/sdk/grafana/Azure.ResourceManager.Grafana/assets.json index c8565b18cd88..a6ee988c8a94 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/assets.json +++ b/sdk/grafana/Azure.ResourceManager.Grafana/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/grafana/Azure.ResourceManager.Grafana", - "Tag": "net/grafana/Azure.ResourceManager.Grafana_df087e336d" + "Tag": "" } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Azure.ResourceManager.Grafana.csproj b/sdk/grafana/Azure.ResourceManager.Grafana/src/Azure.ResourceManager.Grafana.csproj index e237a5dbe65e..246487e23333 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Azure.ResourceManager.Grafana.csproj +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Azure.ResourceManager.Grafana.csproj @@ -1,10 +1,8 @@ - 1.2.0-beta.1 - - 1.1.1 + 1.2.0-beta.2 Azure.ResourceManager.Grafana - Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.Dashboard. - azure;management;arm;resource manager;Grafana + Azure Resource Manager client SDK for Azure resource provider Grafana. + azure;management;arm;resource manager;grafana diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ArmGrafanaModelFactory.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ArmGrafanaModelFactory.cs new file mode 100644 index 000000000000..cfa883fe38dc --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ArmGrafanaModelFactory.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; + +namespace Azure.ResourceManager.Grafana.Models +{ + public static partial class ArmGrafanaModelFactory + { + /// Initializes a new instance of . + /// Provisioning state of the resource. + /// The Grafana software version. + /// The endpoint of the Grafana instance. + /// Indicate the state for enable or disable traffic over the public interface. + /// The zone redundancy setting of the Grafana instance. + /// The api key setting of the Grafana instance. + /// Whether a Grafana instance uses deterministic outbound IPs. + /// List of outbound IPs if deterministicOutboundIP is enabled. + /// The private endpoint connections of the Grafana instance. + /// Scope for dns deterministic name hash calculation. + /// GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. + /// Enterprise settings of a Grafana instance. + /// Server configurations of a Grafana instance. + /// Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition. + /// The major Grafana software version to target. + /// A new instance for mocking. + [Obsolete("This method is obsolete and will be removed in a future release.", false)] + [EditorBrowsable(EditorBrowsableState.Never)] + public static ManagedGrafanaProperties ManagedGrafanaProperties(GrafanaProvisioningState? provisioningState, string grafanaVersion, string endpoint, GrafanaPublicNetworkAccess? publicNetworkAccess, GrafanaZoneRedundancy? zoneRedundancy, GrafanaApiKey? apiKey, DeterministicOutboundIP? deterministicOutboundIP, IEnumerable outboundIPs, IEnumerable privateEndpointConnections, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, IEnumerable monitorWorkspaceIntegrations, EnterpriseConfigurations enterpriseConfigurations, Smtp grafanaConfigurationsSmtp, IDictionary grafanaPlugins, string grafanaMajorVersion) + { + throw new NotSupportedException("This method is obsolete and will be removed in a future release."); + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/GrafanaPrivateLinkResourceData.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/GrafanaPrivateLinkResourceData.cs new file mode 100644 index 000000000000..c2bb6b3d5be8 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/GrafanaPrivateLinkResourceData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Grafana +{ + /// + /// A class representing the GrafanaPrivateLinkResource data model. + /// A private link resource + /// + public partial class GrafanaPrivateLinkResourceData : ResourceData + { + /// Initializes a new instance of . + [EditorBrowsable(EditorBrowsableState.Never)] + public GrafanaPrivateLinkResourceData() + { + RequiredMembers = new ChangeTrackingList(); + RequiredZoneNames = new ChangeTrackingList(); + } + /// The private link resource required member names. + [EditorBrowsable(EditorBrowsableState.Never)] + public IReadOnlyList RequiredMembers { get; } + /// The private link resource Private link DNS zone name. + [EditorBrowsable(EditorBrowsableState.Never)] + public IList RequiredZoneNames { get; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ManagedGrafanaPatchProperties.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ManagedGrafanaPatchProperties.cs new file mode 100644 index 000000000000..7b8c4015b1c4 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ManagedGrafanaPatchProperties.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Grafana.Models +{ + /// + /// A class representing the ManagedGrafanaPatchProperties data model. + /// + public partial class ManagedGrafanaPatchProperties + { + /// + /// Email server settings. + /// https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp + /// + [Obsolete("This property is obsolete and will be removed in a future release.", false)] + [EditorBrowsable(EditorBrowsableState.Never)] + public Smtp GrafanaConfigurationsSmtp { get; set; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ManagedGrafanaProperties.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ManagedGrafanaProperties.cs new file mode 100644 index 000000000000..6e842a7b9767 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/ManagedGrafanaProperties.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Grafana.Models +{ + /// + /// A class representing the ManagedGrafanaProperties data model. + /// + public partial class ManagedGrafanaProperties + { + /// + /// Email server settings. + /// https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp + /// + [Obsolete("This property is obsolete and will be removed in a future release.", false)] + [EditorBrowsable(EditorBrowsableState.Never)] + public Smtp GrafanaConfigurationsSmtp { get; set; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/Smtp.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/Models/Smtp.Serialization.cs similarity index 100% rename from sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/Smtp.Serialization.cs rename to sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/Models/Smtp.Serialization.cs diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/Smtp.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/Models/Smtp.cs similarity index 96% rename from sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/Smtp.cs rename to sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/Models/Smtp.cs index ff6d134056e5..c0bd7277fd63 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/Smtp.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/Models/Smtp.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.Grafana.Models { @@ -14,6 +13,8 @@ namespace Azure.ResourceManager.Grafana.Models /// Email server settings. /// https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp /// + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This class is obsolete and will be removed in a future release", false)] public partial class Smtp { /// diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/StartTLSPolicy.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/Models/StartTLSPolicy.cs similarity index 95% rename from sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/StartTLSPolicy.cs rename to sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/Models/StartTLSPolicy.cs index 1c2de2b0081e..fa3bf4535760 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/StartTLSPolicy.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Customization/Models/StartTLSPolicy.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -14,6 +12,8 @@ namespace Azure.ResourceManager.Grafana.Models /// The StartTLSPolicy setting of the SMTP configuration /// https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy /// + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This struct is obsolete and will be removed in a future release", false)] public readonly partial struct StartTLSPolicy : IEquatable { private readonly string _value; diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs index 8ad862200c5b..807092de886b 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs @@ -25,7 +25,7 @@ public static partial class ArmGrafanaModelFactory /// The location. /// The Sku of the grafana resource. /// Properties specific to the grafana resource. - /// The managed identity of the grafana resource. + /// The managed service identities assigned to this resource. /// A new instance for mocking. public static ManagedGrafanaData ManagedGrafanaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string skuName = null, ManagedGrafanaProperties properties = null, ManagedServiceIdentity identity = null) { @@ -57,11 +57,11 @@ public static ManagedGrafanaData ManagedGrafanaData(ResourceIdentifier id = null /// Scope for dns deterministic name hash calculation. /// GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. /// Enterprise settings of a Grafana instance. - /// Server configurations of a Grafana instance. + /// Server configurations of a Grafana instance. /// Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition. /// The major Grafana software version to target. /// A new instance for mocking. - public static ManagedGrafanaProperties ManagedGrafanaProperties(GrafanaProvisioningState? provisioningState = null, string grafanaVersion = null, string endpoint = null, GrafanaPublicNetworkAccess? publicNetworkAccess = null, GrafanaZoneRedundancy? zoneRedundancy = null, GrafanaApiKey? apiKey = null, DeterministicOutboundIP? deterministicOutboundIP = null, IEnumerable outboundIPs = null, IEnumerable privateEndpointConnections = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, IEnumerable monitorWorkspaceIntegrations = null, EnterpriseConfigurations enterpriseConfigurations = null, Smtp grafanaConfigurationsSmtp = null, IDictionary grafanaPlugins = null, string grafanaMajorVersion = null) + public static ManagedGrafanaProperties ManagedGrafanaProperties(GrafanaProvisioningState? provisioningState = null, string grafanaVersion = null, string endpoint = null, GrafanaPublicNetworkAccess? publicNetworkAccess = null, GrafanaZoneRedundancy? zoneRedundancy = null, GrafanaApiKey? apiKey = null, DeterministicOutboundIP? deterministicOutboundIP = null, IEnumerable outboundIPs = null, IEnumerable privateEndpointConnections = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, IEnumerable monitorWorkspaceIntegrations = null, EnterpriseConfigurations enterpriseConfigurations = null, GrafanaConfigurations grafanaConfigurations = null, IDictionary grafanaPlugins = null, string grafanaMajorVersion = null) { outboundIPs ??= new List(); privateEndpointConnections ??= new List(); @@ -81,7 +81,7 @@ public static ManagedGrafanaProperties ManagedGrafanaProperties(GrafanaProvision autoGeneratedDomainNameLabelScope, monitorWorkspaceIntegrations != null ? new GrafanaIntegrations(monitorWorkspaceIntegrations?.ToList(), serializedAdditionalRawData: null) : null, enterpriseConfigurations, - grafanaConfigurationsSmtp != null ? new GrafanaConfigurations(grafanaConfigurationsSmtp, serializedAdditionalRawData: null) : null, + grafanaConfigurations, grafanaPlugins, grafanaMajorVersion, serializedAdditionalRawData: null); @@ -121,33 +121,6 @@ public static GrafanaPlugin GrafanaPlugin(string pluginId = null) return new GrafanaPlugin(pluginId, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Provisioning state of the resource. - /// The private link resource group id. - /// The private link resource required member names. - /// The private link resource Private link DNS zone name. - /// A new instance for mocking. - public static GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GrafanaProvisioningState? provisioningState = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) - { - requiredMembers ??= new List(); - requiredZoneNames ??= new List(); - - return new GrafanaPrivateLinkResourceData( - id, - name, - resourceType, - systemData, - provisioningState, - groupId, - requiredMembers?.ToList(), - requiredZoneNames?.ToList(), - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// SaaS subscription details of a Grafana instance. /// The allocation details of the per subscription free trial slot of the subscription. @@ -198,6 +171,33 @@ public static GrafanaAvailablePlugin GrafanaAvailablePlugin(string pluginId = nu return new GrafanaAvailablePlugin(pluginId, name, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Provisioning state of the resource. + /// The private link resource group id. + /// The private link resource required member names. + /// The private link resource Private link DNS zone name. + /// A new instance for mocking. + public static GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GrafanaProvisioningState? provisioningState = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + { + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); + + return new GrafanaPrivateLinkResourceData( + id, + name, + resourceType, + systemData, + provisioningState, + groupId, + requiredMembers?.ToList(), + requiredZoneNames?.ToList(), + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -245,5 +245,66 @@ public static ManagedPrivateEndpointConnectionState ManagedPrivateEndpointConnec { return new ManagedPrivateEndpointConnectionState(status, description, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// A new instance for mocking. + public static GrafanaIntegrationFabricData GrafanaIntegrationFabricData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GrafanaIntegrationFabricProperties properties = null) + { + tags ??= new Dictionary(); + + return new GrafanaIntegrationFabricData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Provisioning state of the resource. + /// The resource Id of the Azure resource being integrated with Azure Managed Grafana. E.g., an Azure Kubernetes Service cluster. + /// The resource Id of the Azure resource which is used to configure Grafana data source. E.g., an Azure Monitor Workspace, an Azure Data Explorer cluster, etc. + /// A list of integration scenarios covered by this integration fabric. + /// A new instance for mocking. + public static GrafanaIntegrationFabricProperties GrafanaIntegrationFabricProperties(GrafanaProvisioningState? provisioningState = null, ResourceIdentifier targetResourceId = null, ResourceIdentifier dataSourceResourceId = null, IEnumerable scenarios = null) + { + scenarios ??= new List(); + + return new GrafanaIntegrationFabricProperties(provisioningState, targetResourceId, dataSourceResourceId, scenarios?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static ManagedDashboardData ManagedDashboardData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GrafanaProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + + return new ManagedDashboardData( + id, + name, + resourceType, + systemData, + tags, + location, + provisioningState, + serializedAdditionalRawData: null); + } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/GrafanaExtensions.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/GrafanaExtensions.cs index db7dc62a5ebc..e0f49331bf0d 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/GrafanaExtensions.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/GrafanaExtensions.cs @@ -108,6 +108,44 @@ public static ManagedPrivateEndpointModelResource GetManagedPrivateEndpointModel return GetMockableGrafanaArmClient(client).GetManagedPrivateEndpointModelResource(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 GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableGrafanaArmClient(client).GetGrafanaIntegrationFabricResource(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 ManagedDashboardResource GetManagedDashboardResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableGrafanaArmClient(client).GetManagedDashboardResource(id); + } + /// /// Gets a collection of ManagedGrafanaResources in the ResourceGroupResource. /// @@ -134,11 +172,11 @@ public static ManagedGrafanaCollection GetManagedGrafanas(this ResourceGroupReso /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -172,11 +210,11 @@ public static async Task> GetManagedGrafanaAsyn /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -201,6 +239,99 @@ public static Response GetManagedGrafana(this ResourceGr return GetMockableGrafanaResourceGroupResource(resourceGroupResource).GetManagedGrafana(workspaceName, cancellationToken); } + /// + /// Gets a collection of ManagedDashboardResources 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 ManagedDashboardResources and their operations over a ManagedDashboardResource. + public static ManagedDashboardCollection GetManagedDashboards(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableGrafanaResourceGroupResource(resourceGroupResource).GetManagedDashboards(); + } + + /// + /// Get the properties of a specific dashboard for grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetManagedDashboardAsync(this ResourceGroupResource resourceGroupResource, string dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableGrafanaResourceGroupResource(resourceGroupResource).GetManagedDashboardAsync(dashboardName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the properties of a specific dashboard for grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetManagedDashboard(this ResourceGroupResource resourceGroupResource, string dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableGrafanaResourceGroupResource(resourceGroupResource).GetManagedDashboard(dashboardName, cancellationToken); + } + /// /// List all resources of workspaces for Grafana under the specified subscription. /// @@ -210,11 +341,11 @@ public static Response GetManagedGrafana(this ResourceGr /// /// /// Operation Id - /// Grafana_List + /// ManagedGrafana_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -246,11 +377,11 @@ public static AsyncPageable GetManagedGrafanasAsync(this /// /// /// Operation Id - /// Grafana_List + /// ManagedGrafana_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -272,5 +403,77 @@ public static Pageable GetManagedGrafanas(this Subscript return GetMockableGrafanaSubscriptionResource(subscriptionResource).GetManagedGrafanas(cancellationToken); } + + /// + /// List all resources of dashboards under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/dashboards + /// + /// + /// Operation Id + /// ManagedDashboard_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// 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 GetManagedDashboardsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableGrafanaSubscriptionResource(subscriptionResource).GetManagedDashboardsAsync(cancellationToken); + } + + /// + /// List all resources of dashboards under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/dashboards + /// + /// + /// Operation Id + /// ManagedDashboard_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// 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 GetManagedDashboards(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableGrafanaSubscriptionResource(subscriptionResource).GetManagedDashboards(cancellationToken); + } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaArmClient.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaArmClient.cs index 70c0dd7354c8..9ca0de85722f 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaArmClient.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaArmClient.cs @@ -81,5 +81,29 @@ public virtual ManagedPrivateEndpointModelResource GetManagedPrivateEndpointMode ManagedPrivateEndpointModelResource.ValidateResourceId(id); return new ManagedPrivateEndpointModelResource(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 GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResource(ResourceIdentifier id) + { + GrafanaIntegrationFabricResource.ValidateResourceId(id); + return new GrafanaIntegrationFabricResource(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 ManagedDashboardResource GetManagedDashboardResource(ResourceIdentifier id) + { + ManagedDashboardResource.ValidateResourceId(id); + return new ManagedDashboardResource(Client, id); + } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaResourceGroupResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaResourceGroupResource.cs index b7a6c6637b1a..1b180844efa3 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaResourceGroupResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaResourceGroupResource.cs @@ -49,11 +49,11 @@ public virtual ManagedGrafanaCollection GetManagedGrafanas() /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -80,11 +80,11 @@ public virtual async Task> GetManagedGrafanaAsy /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -101,5 +101,74 @@ public virtual Response GetManagedGrafana(string workspa { return GetManagedGrafanas().Get(workspaceName, cancellationToken); } + + /// Gets a collection of ManagedDashboardResources in the ResourceGroupResource. + /// An object representing collection of ManagedDashboardResources and their operations over a ManagedDashboardResource. + public virtual ManagedDashboardCollection GetManagedDashboards() + { + return GetCachedClient(client => new ManagedDashboardCollection(client, Id)); + } + + /// + /// Get the properties of a specific dashboard for grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetManagedDashboardAsync(string dashboardName, CancellationToken cancellationToken = default) + { + return await GetManagedDashboards().GetAsync(dashboardName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the properties of a specific dashboard for grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetManagedDashboard(string dashboardName, CancellationToken cancellationToken = default) + { + return GetManagedDashboards().Get(dashboardName, cancellationToken); + } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaSubscriptionResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaSubscriptionResource.cs index b5f94905db5c..1fd5d3df6e15 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaSubscriptionResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaSubscriptionResource.cs @@ -15,8 +15,10 @@ namespace Azure.ResourceManager.Grafana.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableGrafanaSubscriptionResource : ArmResource { - private ClientDiagnostics _managedGrafanaGrafanaClientDiagnostics; - private GrafanaRestOperations _managedGrafanaGrafanaRestClient; + private ClientDiagnostics _managedGrafanaClientDiagnostics; + private ManagedGrafanasRestOperations _managedGrafanaRestClient; + private ClientDiagnostics _managedDashboardClientDiagnostics; + private ManagedDashboardsRestOperations _managedDashboardRestClient; /// Initializes a new instance of the class for mocking. protected MockableGrafanaSubscriptionResource() @@ -30,8 +32,10 @@ internal MockableGrafanaSubscriptionResource(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics ManagedGrafanaGrafanaClientDiagnostics => _managedGrafanaGrafanaClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedGrafanaResource.ResourceType.Namespace, Diagnostics); - private GrafanaRestOperations ManagedGrafanaGrafanaRestClient => _managedGrafanaGrafanaRestClient ??= new GrafanaRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedGrafanaResource.ResourceType)); + private ClientDiagnostics ManagedGrafanaClientDiagnostics => _managedGrafanaClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedGrafanaResource.ResourceType.Namespace, Diagnostics); + private ManagedGrafanasRestOperations ManagedGrafanaRestClient => _managedGrafanaRestClient ??= new ManagedGrafanasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedGrafanaResource.ResourceType)); + private ClientDiagnostics ManagedDashboardClientDiagnostics => _managedDashboardClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedDashboardResource.ResourceType.Namespace, Diagnostics); + private ManagedDashboardsRestOperations ManagedDashboardRestClient => _managedDashboardRestClient ??= new ManagedDashboardsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedDashboardResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -48,11 +52,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Operation Id - /// Grafana_List + /// ManagedGrafana_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -64,9 +68,9 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetManagedGrafanasAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedGrafanaGrafanaRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedGrafanaGrafanaRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), ManagedGrafanaGrafanaClientDiagnostics, Pipeline, "MockableGrafanaSubscriptionResource.GetManagedGrafanas", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedGrafanaRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedGrafanaRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), ManagedGrafanaClientDiagnostics, Pipeline, "MockableGrafanaSubscriptionResource.GetManagedGrafanas", "value", "nextLink", cancellationToken); } /// @@ -78,11 +82,11 @@ public virtual AsyncPageable GetManagedGrafanasAsync(Can /// /// /// Operation Id - /// Grafana_List + /// ManagedGrafana_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -94,9 +98,69 @@ public virtual AsyncPageable GetManagedGrafanasAsync(Can /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetManagedGrafanas(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedGrafanaGrafanaRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedGrafanaGrafanaRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), ManagedGrafanaGrafanaClientDiagnostics, Pipeline, "MockableGrafanaSubscriptionResource.GetManagedGrafanas", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedGrafanaRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedGrafanaRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), ManagedGrafanaClientDiagnostics, Pipeline, "MockableGrafanaSubscriptionResource.GetManagedGrafanas", "value", "nextLink", cancellationToken); + } + + /// + /// List all resources of dashboards under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/dashboards + /// + /// + /// Operation Id + /// ManagedDashboard_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetManagedDashboardsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedDashboardRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedDashboardRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedDashboardResource(Client, ManagedDashboardData.DeserializeManagedDashboardData(e)), ManagedDashboardClientDiagnostics, Pipeline, "MockableGrafanaSubscriptionResource.GetManagedDashboards", "value", "nextLink", cancellationToken); + } + + /// + /// List all resources of dashboards under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/dashboards + /// + /// + /// Operation Id + /// ManagedDashboard_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetManagedDashboards(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedDashboardRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedDashboardRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedDashboardResource(Client, ManagedDashboardData.DeserializeManagedDashboardData(e)), ManagedDashboardClientDiagnostics, Pipeline, "MockableGrafanaSubscriptionResource.GetManagedDashboards", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricCollection.cs new file mode 100644 index 000000000000..5b11f9232d49 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricCollection.cs @@ -0,0 +1,493 @@ +// 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.Grafana +{ + /// + /// 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 GetGrafanaIntegrationFabrics method from an instance of . + /// + public partial class GrafanaIntegrationFabricCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics; + private readonly IntegrationFabricsRestOperations _grafanaIntegrationFabricIntegrationFabricsRestClient; + + /// Initializes a new instance of the class for mocking. + protected GrafanaIntegrationFabricCollection() + { + } + + /// 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 GrafanaIntegrationFabricCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", GrafanaIntegrationFabricResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GrafanaIntegrationFabricResource.ResourceType, out string grafanaIntegrationFabricIntegrationFabricsApiVersion); + _grafanaIntegrationFabricIntegrationFabricsRestClient = new IntegrationFabricsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, grafanaIntegrationFabricIntegrationFabricsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ManagedGrafanaResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ManagedGrafanaResource.ResourceType), nameof(id)); + } + + /// + /// Create a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Create + /// + /// + /// Default Api Version + /// 2024-11-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 integration fabric name of Azure Managed Grafana. + /// The to use. + /// 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 integrationFabricName, GrafanaIntegrationFabricData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, data, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(new GrafanaIntegrationFabricOperationSource(Client), _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics, Pipeline, _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, 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 IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Create + /// + /// + /// Default Api Version + /// 2024-11-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 integration fabric name of Azure Managed Grafana. + /// The to use. + /// 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 integrationFabricName, GrafanaIntegrationFabricData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _grafanaIntegrationFabricIntegrationFabricsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, data, cancellationToken); + var operation = new GrafanaArmOperation(new GrafanaIntegrationFabricOperationSource(Client), _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics, Pipeline, _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The integration fabric name of Azure Managed Grafana. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.Get"); + scope.Start(); + try + { + var response = await _grafanaIntegrationFabricIntegrationFabricsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The integration fabric name of Azure Managed Grafana. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.Get"); + scope.Start(); + try + { + var response = _grafanaIntegrationFabricIntegrationFabricsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List IntegrationFabric resources by ManagedGrafana + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics + /// + /// + /// Operation Id + /// IntegrationFabric_List + /// + /// + /// Default Api Version + /// 2024-11-01-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) => _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GrafanaIntegrationFabricResource(Client, GrafanaIntegrationFabricData.DeserializeGrafanaIntegrationFabricData(e)), _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics, Pipeline, "GrafanaIntegrationFabricCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List IntegrationFabric resources by ManagedGrafana + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics + /// + /// + /// Operation Id + /// IntegrationFabric_List + /// + /// + /// Default Api Version + /// 2024-11-01-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) => _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GrafanaIntegrationFabricResource(Client, GrafanaIntegrationFabricData.DeserializeGrafanaIntegrationFabricData(e)), _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics, Pipeline, "GrafanaIntegrationFabricCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The integration fabric name of Azure Managed Grafana. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.Exists"); + scope.Start(); + try + { + var response = await _grafanaIntegrationFabricIntegrationFabricsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, 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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The integration fabric name of Azure Managed Grafana. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.Exists"); + scope.Start(); + try + { + var response = _grafanaIntegrationFabricIntegrationFabricsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, 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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The integration fabric name of Azure Managed Grafana. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _grafanaIntegrationFabricIntegrationFabricsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GrafanaIntegrationFabricResource(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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The integration fabric name of Azure Managed Grafana. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.GetIfExists"); + scope.Start(); + try + { + var response = _grafanaIntegrationFabricIntegrationFabricsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, integrationFabricName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GrafanaIntegrationFabricResource(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/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricData.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricData.Serialization.cs new file mode 100644 index 000000000000..7e4847c6f2dd --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricData.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; +using Azure.ResourceManager.Grafana.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Grafana +{ + public partial class GrafanaIntegrationFabricData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GrafanaIntegrationFabricData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + GrafanaIntegrationFabricData 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(GrafanaIntegrationFabricData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGrafanaIntegrationFabricData(document.RootElement, options); + } + + internal static GrafanaIntegrationFabricData DeserializeGrafanaIntegrationFabricData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GrafanaIntegrationFabricProperties properties = default; + IDictionary tags = default; + AzureLocation location = 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 = GrafanaIntegrationFabricProperties.DeserializeGrafanaIntegrationFabricProperties(property.Value, options); + 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GrafanaIntegrationFabricData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(GrafanaIntegrationFabricData)} does not support writing '{options.Format}' format."); + } + } + + GrafanaIntegrationFabricData 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGrafanaIntegrationFabricData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GrafanaIntegrationFabricData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricData.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricData.cs new file mode 100644 index 000000000000..0817ba696f29 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricData.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; +using Azure.ResourceManager.Grafana.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Grafana +{ + /// + /// A class representing the GrafanaIntegrationFabric data model. + /// The integration fabric resource type. + /// + public partial class GrafanaIntegrationFabricData : 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 GrafanaIntegrationFabricData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// Keeps track of any properties unknown to the library. + internal GrafanaIntegrationFabricData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, GrafanaIntegrationFabricProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GrafanaIntegrationFabricData() + { + } + + /// Gets or sets the properties. + public GrafanaIntegrationFabricProperties Properties { get; set; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricResource.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricResource.Serialization.cs new file mode 100644 index 000000000000..5c006b38fe13 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.Grafana +{ + public partial class GrafanaIntegrationFabricResource : IJsonModel + { + private static GrafanaIntegrationFabricData s_dataDeserializationInstance; + private static GrafanaIntegrationFabricData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + GrafanaIntegrationFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGrafanaContext.Default); + + GrafanaIntegrationFabricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGrafanaContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricResource.cs new file mode 100644 index 000000000000..8acd90c516fe --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaIntegrationFabricResource.cs @@ -0,0 +1,707 @@ +// 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.Grafana.Models; + +namespace Azure.ResourceManager.Grafana +{ + /// + /// A Class representing a GrafanaIntegrationFabric 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 GetGrafanaIntegrationFabricResource method. + /// Otherwise you can get one from its parent resource using the GetGrafanaIntegrationFabric method. + /// + public partial class GrafanaIntegrationFabricResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The workspaceName. + /// The integrationFabricName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics; + private readonly IntegrationFabricsRestOperations _grafanaIntegrationFabricIntegrationFabricsRestClient; + private readonly GrafanaIntegrationFabricData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Dashboard/grafana/integrationFabrics"; + + /// Initializes a new instance of the class for mocking. + protected GrafanaIntegrationFabricResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GrafanaIntegrationFabricResource(ArmClient client, GrafanaIntegrationFabricData 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 GrafanaIntegrationFabricResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string grafanaIntegrationFabricIntegrationFabricsApiVersion); + _grafanaIntegrationFabricIntegrationFabricsRestClient = new IntegrationFabricsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, grafanaIntegrationFabricIntegrationFabricsApiVersion); +#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 GrafanaIntegrationFabricData 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 IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.Get"); + scope.Start(); + try + { + var response = await _grafanaIntegrationFabricIntegrationFabricsRestClient.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 GrafanaIntegrationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.Get"); + scope.Start(); + try + { + var response = _grafanaIntegrationFabricIntegrationFabricsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.Delete"); + scope.Start(); + try + { + var response = await _grafanaIntegrationFabricIntegrationFabricsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(_grafanaIntegrationFabricIntegrationFabricsClientDiagnostics, Pipeline, _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.Delete"); + scope.Start(); + try + { + var response = _grafanaIntegrationFabricIntegrationFabricsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new GrafanaArmOperation(_grafanaIntegrationFabricIntegrationFabricsClientDiagnostics, Pipeline, _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Update + /// + /// + /// Default Api Version + /// 2024-11-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 to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GrafanaIntegrationFabricPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.Update"); + scope.Start(); + try + { + var response = await _grafanaIntegrationFabricIntegrationFabricsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(new GrafanaIntegrationFabricOperationSource(Client), _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics, Pipeline, _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Update + /// + /// + /// Default Api Version + /// 2024-11-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 to use. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GrafanaIntegrationFabricPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.Update"); + scope.Start(); + try + { + var response = _grafanaIntegrationFabricIntegrationFabricsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new GrafanaArmOperation(new GrafanaIntegrationFabricOperationSource(Client), _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics, Pipeline, _grafanaIntegrationFabricIntegrationFabricsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.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 _grafanaIntegrationFabricIntegrationFabricsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GrafanaIntegrationFabricPatch(); + 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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.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 = _grafanaIntegrationFabricIntegrationFabricsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GrafanaIntegrationFabricPatch(); + 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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.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 _grafanaIntegrationFabricIntegrationFabricsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GrafanaIntegrationFabricPatch(); + 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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.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 = _grafanaIntegrationFabricIntegrationFabricsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GrafanaIntegrationFabricPatch(); + 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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.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 _grafanaIntegrationFabricIntegrationFabricsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GrafanaIntegrationFabricPatch(); + 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.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _grafanaIntegrationFabricIntegrationFabricsClientDiagnostics.CreateScope("GrafanaIntegrationFabricResource.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 = _grafanaIntegrationFabricIntegrationFabricsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GrafanaIntegrationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GrafanaIntegrationFabricPatch(); + 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/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionCollection.cs index d077361ec365..69213d10f03b 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionCollection.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateEndpointConnections_Approve + /// PrivateEndpointConnection_Approve /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task /// /// /// Operation Id - /// PrivateEndpointConnections_Approve + /// PrivateEndpointConnection_Approve /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUp /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task> Ge /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string pri /// /// /// Operation Id - /// PrivateEndpointConnections_List + /// PrivateEndpointConnection_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsy /// /// /// Operation Id - /// PrivateEndpointConnections_List + /// PrivateEndpointConnection_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -308,11 +308,11 @@ public virtual Pageable GetAll(Cancell /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -394,11 +394,11 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -439,11 +439,11 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionResource.cs index 8233180d0898..c0a20fba7b8c 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionResource.cs @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -137,11 +137,11 @@ public virtual async Task> Ge /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -177,11 +177,11 @@ public virtual Response Get(Cancellati /// /// /// Operation Id - /// PrivateEndpointConnections_Delete + /// PrivateEndpointConnection_Delete /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -219,11 +219,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// PrivateEndpointConnections_Delete + /// PrivateEndpointConnection_Delete /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -261,11 +261,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// PrivateEndpointConnections_Approve + /// PrivateEndpointConnection_Approve /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -307,11 +307,11 @@ public virtual async Task /// /// /// Operation Id - /// PrivateEndpointConnections_Approve + /// PrivateEndpointConnection_Approve /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResource.cs index 821523c267e8..2500face5e2f 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResource.cs @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -137,11 +137,11 @@ public virtual async Task> GetAsync(Cancell /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResourceCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResourceCollection.cs index a2ec377c4da4..772911b1de46 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResourceCollection.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResourceCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -105,11 +105,11 @@ public virtual async Task> GetAsync(string /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -150,11 +150,11 @@ public virtual Response Get(string privateLinkResour /// /// /// Operation Id - /// PrivateLinkResources_List + /// PrivateLinkResource_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -180,11 +180,11 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Operation Id - /// PrivateLinkResources_List + /// PrivateLinkResource_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -210,11 +210,11 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -253,11 +253,11 @@ public virtual async Task> ExistsAsync(string privateLinkResource /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -296,11 +296,11 @@ public virtual Response Exists(string privateLinkResourceName, Cancellatio /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -341,11 +341,11 @@ public virtual async Task> GetIfExi /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResourceData.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResourceData.cs index 85050a44fec6..387208ce0e9d 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResourceData.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResourceData.cs @@ -51,13 +51,6 @@ public partial class GrafanaPrivateLinkResourceData : ResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public GrafanaPrivateLinkResourceData() - { - RequiredMembers = new ChangeTrackingList(); - RequiredZoneNames = new ChangeTrackingList(); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -81,9 +74,5 @@ internal GrafanaPrivateLinkResourceData(ResourceIdentifier id, string name, Reso public GrafanaProvisioningState? ProvisioningState { get; } /// The private link resource group id. public string GroupId { get; } - /// The private link resource required member names. - public IReadOnlyList RequiredMembers { get; } - /// The private link resource Private link DNS zone name. - public IList RequiredZoneNames { get; } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/LongRunningOperation/GrafanaIntegrationFabricOperationSource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/LongRunningOperation/GrafanaIntegrationFabricOperationSource.cs new file mode 100644 index 000000000000..bf935ba1df31 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/LongRunningOperation/GrafanaIntegrationFabricOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Grafana +{ + internal class GrafanaIntegrationFabricOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal GrafanaIntegrationFabricOperationSource(ArmClient client) + { + _client = client; + } + + GrafanaIntegrationFabricResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerGrafanaContext.Default); + return new GrafanaIntegrationFabricResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerGrafanaContext.Default); + return await Task.FromResult(new GrafanaIntegrationFabricResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/LongRunningOperation/ManagedDashboardOperationSource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/LongRunningOperation/ManagedDashboardOperationSource.cs new file mode 100644 index 000000000000..b3f1aad9e479 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/LongRunningOperation/ManagedDashboardOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Grafana +{ + internal class ManagedDashboardOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ManagedDashboardOperationSource(ArmClient client) + { + _client = client; + } + + ManagedDashboardResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerGrafanaContext.Default); + return new ManagedDashboardResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerGrafanaContext.Default); + return await Task.FromResult(new ManagedDashboardResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardCollection.cs new file mode 100644 index 000000000000..2380430605be --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardCollection.cs @@ -0,0 +1,494 @@ +// 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.Grafana +{ + /// + /// 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 GetManagedDashboards method from an instance of . + /// + public partial class ManagedDashboardCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _managedDashboardClientDiagnostics; + private readonly ManagedDashboardsRestOperations _managedDashboardRestClient; + + /// Initializes a new instance of the class for mocking. + protected ManagedDashboardCollection() + { + } + + /// 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 ManagedDashboardCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _managedDashboardClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedDashboardResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ManagedDashboardResource.ResourceType, out string managedDashboardApiVersion); + _managedDashboardRestClient = new ManagedDashboardsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedDashboardApiVersion); +#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)); + } + + /// + /// Create or update a dashboard for grafana resource. This API is idempotent, so user can either create a new dashboard or update an existing dashboard. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Create + /// + /// + /// Default Api Version + /// 2024-11-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 Azure Managed Dashboard. + /// The to use. + /// 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 dashboardName, ManagedDashboardData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _managedDashboardRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, data, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(new ManagedDashboardOperationSource(Client), _managedDashboardClientDiagnostics, Pipeline, _managedDashboardRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, 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 or update a dashboard for grafana resource. This API is idempotent, so user can either create a new dashboard or update an existing dashboard. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Create + /// + /// + /// Default Api Version + /// 2024-11-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 Azure Managed Dashboard. + /// The to use. + /// 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 dashboardName, ManagedDashboardData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _managedDashboardRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, data, cancellationToken); + var operation = new GrafanaArmOperation(new ManagedDashboardOperationSource(Client), _managedDashboardClientDiagnostics, Pipeline, _managedDashboardRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the properties of a specific dashboard for grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardCollection.Get"); + scope.Start(); + try + { + var response = await _managedDashboardRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ManagedDashboardResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the properties of a specific dashboard for grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardCollection.Get"); + scope.Start(); + try + { + var response = _managedDashboardRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ManagedDashboardResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all resources of dashboards under the specified resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards + /// + /// + /// Operation Id + /// ManagedDashboard_List + /// + /// + /// Default Api Version + /// 2024-11-01-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) => _managedDashboardRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedDashboardRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedDashboardResource(Client, ManagedDashboardData.DeserializeManagedDashboardData(e)), _managedDashboardClientDiagnostics, Pipeline, "ManagedDashboardCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all resources of dashboards under the specified resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards + /// + /// + /// Operation Id + /// ManagedDashboard_List + /// + /// + /// Default Api Version + /// 2024-11-01-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) => _managedDashboardRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedDashboardRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedDashboardResource(Client, ManagedDashboardData.DeserializeManagedDashboardData(e)), _managedDashboardClientDiagnostics, Pipeline, "ManagedDashboardCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardCollection.Exists"); + scope.Start(); + try + { + var response = await _managedDashboardRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, 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.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardCollection.Exists"); + scope.Start(); + try + { + var response = _managedDashboardRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, 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.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _managedDashboardRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ManagedDashboardResource(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.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure Managed Dashboard. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardCollection.GetIfExists"); + scope.Start(); + try + { + var response = _managedDashboardRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, dashboardName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ManagedDashboardResource(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/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardData.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardData.Serialization.cs new file mode 100644 index 000000000000..603dc13a9cb9 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardData.Serialization.cs @@ -0,0 +1,193 @@ +// 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.Grafana.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Grafana +{ + public partial class ManagedDashboardData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(ManagedDashboardData)} 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.WriteEndObject(); + } + + ManagedDashboardData 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(ManagedDashboardData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedDashboardData(document.RootElement, options); + } + + internal static ManagedDashboardData DeserializeManagedDashboardData(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; + GrafanaProvisioningState? provisioningState = 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 GrafanaProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedDashboardData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(ManagedDashboardData)} does not support writing '{options.Format}' format."); + } + } + + ManagedDashboardData 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagedDashboardData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedDashboardData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardData.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardData.cs new file mode 100644 index 000000000000..0b04e10c7a44 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardData.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; +using Azure.ResourceManager.Grafana.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Grafana +{ + /// + /// A class representing the ManagedDashboard data model. + /// The managed dashboard resource type. + /// + public partial class ManagedDashboardData : 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 ManagedDashboardData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal ManagedDashboardData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, GrafanaProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ManagedDashboardData() + { + } + + /// Provisioning state of the resource. + public GrafanaProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardResource.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardResource.Serialization.cs new file mode 100644 index 000000000000..9130914f0c04 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.Grafana +{ + public partial class ManagedDashboardResource : IJsonModel + { + private static ManagedDashboardData s_dataDeserializationInstance; + private static ManagedDashboardData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ManagedDashboardData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGrafanaContext.Default); + + ManagedDashboardData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGrafanaContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardResource.cs new file mode 100644 index 000000000000..da5278ec3c13 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedDashboardResource.cs @@ -0,0 +1,703 @@ +// 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.Grafana.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Grafana +{ + /// + /// A Class representing a ManagedDashboard 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 GetManagedDashboardResource method. + /// Otherwise you can get one from its parent resource using the GetManagedDashboard method. + /// + public partial class ManagedDashboardResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The dashboardName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dashboardName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _managedDashboardClientDiagnostics; + private readonly ManagedDashboardsRestOperations _managedDashboardRestClient; + private readonly ManagedDashboardData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Dashboard/dashboards"; + + /// Initializes a new instance of the class for mocking. + protected ManagedDashboardResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ManagedDashboardResource(ArmClient client, ManagedDashboardData 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 ManagedDashboardResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _managedDashboardClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string managedDashboardApiVersion); + _managedDashboardRestClient = new ManagedDashboardsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedDashboardApiVersion); +#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 ManagedDashboardData 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 the properties of a specific dashboard for grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.Get"); + scope.Start(); + try + { + var response = await _managedDashboardRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ManagedDashboardResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the properties of a specific dashboard for grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.Get"); + scope.Start(); + try + { + var response = _managedDashboardRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ManagedDashboardResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a dashboard for Grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.Delete"); + scope.Start(); + try + { + var response = await _managedDashboardRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _managedDashboardRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GrafanaArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a dashboard for Grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.Delete"); + scope.Start(); + try + { + var response = _managedDashboardRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var uri = _managedDashboardRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GrafanaArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a dashboard for Grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ManagedDashboardPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.Update"); + scope.Start(); + try + { + var response = await _managedDashboardRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ManagedDashboardResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a dashboard for Grafana resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ManagedDashboardPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.Update"); + scope.Start(); + try + { + var response = _managedDashboardRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new ManagedDashboardResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.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 _managedDashboardRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ManagedDashboardResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ManagedDashboardPatch(); + 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; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.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 = _managedDashboardRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ManagedDashboardResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ManagedDashboardPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.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 _managedDashboardRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ManagedDashboardResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ManagedDashboardPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.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 = _managedDashboardRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ManagedDashboardResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ManagedDashboardPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.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 _managedDashboardRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ManagedDashboardResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ManagedDashboardPatch(); + 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; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName} + /// + /// + /// Operation Id + /// ManagedDashboard_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _managedDashboardClientDiagnostics.CreateScope("ManagedDashboardResource.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 = _managedDashboardRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ManagedDashboardResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ManagedDashboardPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaCollection.cs index 021e9bee94f4..f499ffcdc489 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaCollection.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaCollection.cs @@ -25,8 +25,8 @@ namespace Azure.ResourceManager.Grafana /// public partial class ManagedGrafanaCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _managedGrafanaGrafanaClientDiagnostics; - private readonly GrafanaRestOperations _managedGrafanaGrafanaRestClient; + private readonly ClientDiagnostics _managedGrafanaClientDiagnostics; + private readonly ManagedGrafanasRestOperations _managedGrafanaRestClient; /// Initializes a new instance of the class for mocking. protected ManagedGrafanaCollection() @@ -38,9 +38,9 @@ protected ManagedGrafanaCollection() /// The identifier of the parent resource that is the target of operations. internal ManagedGrafanaCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _managedGrafanaGrafanaClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedGrafanaResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ManagedGrafanaResource.ResourceType, out string managedGrafanaGrafanaApiVersion); - _managedGrafanaGrafanaRestClient = new GrafanaRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedGrafanaGrafanaApiVersion); + _managedGrafanaClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedGrafanaResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ManagedGrafanaResource.ResourceType, out string managedGrafanaApiVersion); + _managedGrafanaRestClient = new ManagedGrafanasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedGrafanaApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Grafana_Create + /// ManagedGrafana_Create /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -84,12 +84,12 @@ public virtual async Task> CreateOrUpdateAs Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.CreateOrUpdate"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _managedGrafanaGrafanaRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, data, cancellationToken).ConfigureAwait(false); - var operation = new GrafanaArmOperation(new ManagedGrafanaOperationSource(Client), _managedGrafanaGrafanaClientDiagnostics, Pipeline, _managedGrafanaGrafanaRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _managedGrafanaRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, data, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(new ManagedGrafanaOperationSource(Client), _managedGrafanaClientDiagnostics, Pipeline, _managedGrafanaRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -110,11 +110,11 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Operation Id - /// Grafana_Create + /// ManagedGrafana_Create /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -133,12 +133,12 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.CreateOrUpdate"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.CreateOrUpdate"); scope.Start(); try { - var response = _managedGrafanaGrafanaRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, data, cancellationToken); - var operation = new GrafanaArmOperation(new ManagedGrafanaOperationSource(Client), _managedGrafanaGrafanaClientDiagnostics, Pipeline, _managedGrafanaGrafanaRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _managedGrafanaRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, data, cancellationToken); + var operation = new GrafanaArmOperation(new ManagedGrafanaOperationSource(Client), _managedGrafanaClientDiagnostics, Pipeline, _managedGrafanaRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -159,11 +159,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -179,11 +179,11 @@ public virtual async Task> GetAsync(string work { Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.Get"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.Get"); scope.Start(); try { - var response = await _managedGrafanaGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + var response = await _managedGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ManagedGrafanaResource(Client, response.Value), response.GetRawResponse()); @@ -204,11 +204,11 @@ public virtual async Task> GetAsync(string work /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -224,11 +224,11 @@ public virtual Response Get(string workspaceName, Cancel { Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.Get"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.Get"); scope.Start(); try { - var response = _managedGrafanaGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken); + var response = _managedGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ManagedGrafanaResource(Client, response.Value), response.GetRawResponse()); @@ -249,11 +249,11 @@ public virtual Response Get(string workspaceName, Cancel /// /// /// Operation Id - /// Grafana_ListByResourceGroup + /// ManagedGrafana_ListByResourceGroup /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -265,9 +265,9 @@ public virtual Response Get(string workspaceName, Cancel /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _managedGrafanaGrafanaRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedGrafanaGrafanaRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), _managedGrafanaGrafanaClientDiagnostics, Pipeline, "ManagedGrafanaCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _managedGrafanaRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedGrafanaRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), _managedGrafanaClientDiagnostics, Pipeline, "ManagedGrafanaCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -279,11 +279,11 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Operation Id - /// Grafana_ListByResourceGroup + /// ManagedGrafana_ListByResourceGroup /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -295,9 +295,9 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _managedGrafanaGrafanaRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedGrafanaGrafanaRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), _managedGrafanaGrafanaClientDiagnostics, Pipeline, "ManagedGrafanaCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _managedGrafanaRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedGrafanaRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), _managedGrafanaClientDiagnostics, Pipeline, "ManagedGrafanaCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -309,11 +309,11 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -329,11 +329,11 @@ public virtual async Task> ExistsAsync(string workspaceName, Canc { Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.Exists"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.Exists"); scope.Start(); try { - var response = await _managedGrafanaGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _managedGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -352,11 +352,11 @@ public virtual async Task> ExistsAsync(string workspaceName, Canc /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -372,11 +372,11 @@ public virtual Response Exists(string workspaceName, CancellationToken can { Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.Exists"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.Exists"); scope.Start(); try { - var response = _managedGrafanaGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken: cancellationToken); + var response = _managedGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -395,11 +395,11 @@ public virtual Response Exists(string workspaceName, CancellationToken can /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -415,11 +415,11 @@ public virtual async Task> GetIfExistsA { Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.GetIfExists"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.GetIfExists"); scope.Start(); try { - var response = await _managedGrafanaGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _managedGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new ManagedGrafanaResource(Client, response.Value), response.GetRawResponse()); @@ -440,11 +440,11 @@ public virtual async Task> GetIfExistsA /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -460,11 +460,11 @@ public virtual NullableResponse GetIfExists(string works { Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.GetIfExists"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaCollection.GetIfExists"); scope.Start(); try { - var response = _managedGrafanaGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken: cancellationToken); + var response = _managedGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new ManagedGrafanaResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaData.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaData.cs index dbacfe9131bf..895aa69170fe 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaData.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaData.cs @@ -66,7 +66,7 @@ public ManagedGrafanaData(AzureLocation location) : base(location) /// The location. /// The Sku of the grafana resource. /// Properties specific to the grafana resource. - /// The managed identity of the grafana resource. + /// The managed service identities assigned to this resource. /// Keeps track of any properties unknown to the library. internal ManagedGrafanaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedGrafanaSku sku, ManagedGrafanaProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -83,7 +83,7 @@ internal ManagedGrafanaData() /// The Sku of the grafana resource. internal ManagedGrafanaSku Sku { get; set; } - /// Gets or sets the sku name. + /// The name of the SKU. public string SkuName { get => Sku is null ? default : Sku.Name; @@ -92,7 +92,7 @@ public string SkuName /// Properties specific to the grafana resource. public ManagedGrafanaProperties Properties { get; set; } - /// The managed identity of the grafana resource. + /// The managed service identities assigned to this resource. public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaResource.cs index 55deab669011..2cc5a5d0c8d7 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaResource.cs @@ -36,10 +36,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _managedGrafanaGrafanaClientDiagnostics; - private readonly GrafanaRestOperations _managedGrafanaGrafanaRestClient; - private readonly ClientDiagnostics _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics; - private readonly ManagedPrivateEndpointsRestOperations _managedPrivateEndpointModelManagedPrivateEndpointsRestClient; + private readonly ClientDiagnostics _managedGrafanaClientDiagnostics; + private readonly ManagedGrafanasRestOperations _managedGrafanaRestClient; private readonly ManagedGrafanaData _data; /// Gets the resource type for the operations. @@ -64,12 +62,9 @@ internal ManagedGrafanaResource(ArmClient client, ManagedGrafanaData data) : thi /// The identifier of the resource that is the target of operations. internal ManagedGrafanaResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _managedGrafanaGrafanaClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string managedGrafanaGrafanaApiVersion); - _managedGrafanaGrafanaRestClient = new GrafanaRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedGrafanaGrafanaApiVersion); - _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedPrivateEndpointModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ManagedPrivateEndpointModelResource.ResourceType, out string managedPrivateEndpointModelManagedPrivateEndpointsApiVersion); - _managedPrivateEndpointModelManagedPrivateEndpointsRestClient = new ManagedPrivateEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedPrivateEndpointModelManagedPrivateEndpointsApiVersion); + _managedGrafanaClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string managedGrafanaApiVersion); + _managedGrafanaRestClient = new ManagedGrafanasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedGrafanaApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -112,11 +107,11 @@ public virtual GrafanaPrivateEndpointConnectionCollection GetGrafanaPrivateEndpo /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -143,11 +138,11 @@ public virtual async Task> Ge /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -181,11 +176,11 @@ public virtual GrafanaPrivateLinkResourceCollection GetGrafanaPrivateLinkResourc /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -212,11 +207,11 @@ public virtual async Task> GetGrafanaPrivat /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateLinkResource_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -250,11 +245,11 @@ public virtual ManagedPrivateEndpointModelCollection GetManagedPrivateEndpointMo /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -281,11 +276,11 @@ public virtual async Task> GetMana /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -303,6 +298,75 @@ public virtual Response GetManagedPrivateEn return GetManagedPrivateEndpointModels().Get(managedPrivateEndpointName, cancellationToken); } + /// Gets a collection of GrafanaIntegrationFabricResources in the ManagedGrafana. + /// An object representing collection of GrafanaIntegrationFabricResources and their operations over a GrafanaIntegrationFabricResource. + public virtual GrafanaIntegrationFabricCollection GetGrafanaIntegrationFabrics() + { + return GetCachedClient(client => new GrafanaIntegrationFabricCollection(client, Id)); + } + + /// + /// Get a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The integration fabric name of Azure Managed Grafana. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGrafanaIntegrationFabricAsync(string integrationFabricName, CancellationToken cancellationToken = default) + { + return await GetGrafanaIntegrationFabrics().GetAsync(integrationFabricName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a IntegrationFabric + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName} + /// + /// + /// Operation Id + /// IntegrationFabric_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The integration fabric name of Azure Managed Grafana. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGrafanaIntegrationFabric(string integrationFabricName, CancellationToken cancellationToken = default) + { + return GetGrafanaIntegrationFabrics().Get(integrationFabricName, cancellationToken); + } + /// /// Get the properties of a specific workspace for Grafana resource. /// @@ -312,11 +376,11 @@ public virtual Response GetManagedPrivateEn /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -327,11 +391,11 @@ public virtual Response GetManagedPrivateEn /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Get"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Get"); scope.Start(); try { - var response = await _managedGrafanaGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _managedGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ManagedGrafanaResource(Client, response.Value), response.GetRawResponse()); @@ -352,11 +416,11 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -367,11 +431,11 @@ public virtual async Task> GetAsync(Cancellatio /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Get"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Get"); scope.Start(); try { - var response = _managedGrafanaGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _managedGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ManagedGrafanaResource(Client, response.Value), response.GetRawResponse()); @@ -392,11 +456,11 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Operation Id - /// Grafana_Delete + /// ManagedGrafana_Delete /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -408,12 +472,12 @@ public virtual Response Get(CancellationToken cancellati /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Delete"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Delete"); scope.Start(); try { - var response = await _managedGrafanaGrafanaRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new GrafanaArmOperation(_managedGrafanaGrafanaClientDiagnostics, Pipeline, _managedGrafanaGrafanaRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _managedGrafanaRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(_managedGrafanaClientDiagnostics, Pipeline, _managedGrafanaRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -434,11 +498,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// Grafana_Delete + /// ManagedGrafana_Delete /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -450,12 +514,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Delete"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Delete"); scope.Start(); try { - var response = _managedGrafanaGrafanaRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new GrafanaArmOperation(_managedGrafanaGrafanaClientDiagnostics, Pipeline, _managedGrafanaGrafanaRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _managedGrafanaRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new GrafanaArmOperation(_managedGrafanaClientDiagnostics, Pipeline, _managedGrafanaRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -476,11 +540,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// Grafana_Update + /// ManagedGrafana_Update /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -495,11 +559,11 @@ public virtual async Task> UpdateAsync(ManagedG { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Update"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Update"); scope.Start(); try { - var response = await _managedGrafanaGrafanaRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var response = await _managedGrafanaRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ManagedGrafanaResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -518,11 +582,11 @@ public virtual async Task> UpdateAsync(ManagedG /// /// /// Operation Id - /// Grafana_Update + /// ManagedGrafana_Update /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -537,11 +601,11 @@ public virtual Response Update(ManagedGrafanaPatch patch { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Update"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.Update"); scope.Start(); try { - var response = _managedGrafanaGrafanaRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var response = _managedGrafanaRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); return Response.FromValue(new ManagedGrafanaResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -560,11 +624,11 @@ public virtual Response Update(ManagedGrafanaPatch patch /// /// /// Operation Id - /// Grafana_CheckEnterpriseDetails + /// ManagedGrafanas_CheckEnterpriseDetails /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -575,11 +639,11 @@ public virtual Response Update(ManagedGrafanaPatch patch /// The cancellation token to use. public virtual async Task> CheckEnterpriseDetailsAsync(CancellationToken cancellationToken = default) { - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.CheckEnterpriseDetails"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.CheckEnterpriseDetails"); scope.Start(); try { - var response = await _managedGrafanaGrafanaRestClient.CheckEnterpriseDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _managedGrafanaRestClient.CheckEnterpriseDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -598,11 +662,11 @@ public virtual async Task> CheckEnterpriseDetailsAsy /// /// /// Operation Id - /// Grafana_CheckEnterpriseDetails + /// ManagedGrafanas_CheckEnterpriseDetails /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -613,11 +677,11 @@ public virtual async Task> CheckEnterpriseDetailsAsy /// The cancellation token to use. public virtual Response CheckEnterpriseDetails(CancellationToken cancellationToken = default) { - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.CheckEnterpriseDetails"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.CheckEnterpriseDetails"); scope.Start(); try { - var response = _managedGrafanaGrafanaRestClient.CheckEnterpriseDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _managedGrafanaRestClient.CheckEnterpriseDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -628,6 +692,7 @@ public virtual Response CheckEnterpriseDetails(CancellationTo } /// + /// A synchronous resource action. /// /// /// Request Path @@ -635,11 +700,11 @@ public virtual Response CheckEnterpriseDetails(CancellationTo /// /// /// Operation Id - /// Grafana_FetchAvailablePlugins + /// ManagedGrafanas_FetchAvailablePlugins /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -651,11 +716,12 @@ public virtual Response CheckEnterpriseDetails(CancellationTo /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable FetchAvailablePluginsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _managedGrafanaGrafanaRestClient.CreateFetchAvailablePluginsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => GrafanaAvailablePlugin.DeserializeGrafanaAvailablePlugin(e), _managedGrafanaGrafanaClientDiagnostics, Pipeline, "ManagedGrafanaResource.FetchAvailablePlugins", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _managedGrafanaRestClient.CreateFetchAvailablePluginsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => GrafanaAvailablePlugin.DeserializeGrafanaAvailablePlugin(e), _managedGrafanaClientDiagnostics, Pipeline, "ManagedGrafanaResource.FetchAvailablePlugins", "value", null, cancellationToken); } /// + /// A synchronous resource action. /// /// /// Request Path @@ -663,11 +729,11 @@ public virtual AsyncPageable FetchAvailablePluginsAsync( /// /// /// Operation Id - /// Grafana_FetchAvailablePlugins + /// ManagedGrafanas_FetchAvailablePlugins /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -679,8 +745,8 @@ public virtual AsyncPageable FetchAvailablePluginsAsync( /// A collection of that may take multiple service requests to iterate over. public virtual Pageable FetchAvailablePlugins(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _managedGrafanaGrafanaRestClient.CreateFetchAvailablePluginsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => GrafanaAvailablePlugin.DeserializeGrafanaAvailablePlugin(e), _managedGrafanaGrafanaClientDiagnostics, Pipeline, "ManagedGrafanaResource.FetchAvailablePlugins", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _managedGrafanaRestClient.CreateFetchAvailablePluginsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => GrafanaAvailablePlugin.DeserializeGrafanaAvailablePlugin(e), _managedGrafanaClientDiagnostics, Pipeline, "ManagedGrafanaResource.FetchAvailablePlugins", "value", null, cancellationToken); } /// @@ -692,15 +758,15 @@ public virtual Pageable FetchAvailablePlugins(Cancellati /// /// /// Operation Id - /// ManagedPrivateEndpoints_Refresh + /// ManagedGrafanas_RefreshManagedPrivateEndpoint /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -708,12 +774,12 @@ public virtual Pageable FetchAvailablePlugins(Cancellati /// The cancellation token to use. public virtual async Task RefreshManagedPrivateEndpointAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedGrafanaResource.RefreshManagedPrivateEndpoint"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.RefreshManagedPrivateEndpoint"); scope.Start(); try { - var response = await _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.RefreshAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new GrafanaArmOperation(_managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateRefreshRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _managedGrafanaRestClient.RefreshManagedPrivateEndpointAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(_managedGrafanaClientDiagnostics, Pipeline, _managedGrafanaRestClient.CreateRefreshManagedPrivateEndpointRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -734,15 +800,15 @@ public virtual async Task RefreshManagedPrivateEndpointAsync(WaitU /// /// /// Operation Id - /// ManagedPrivateEndpoints_Refresh + /// ManagedGrafanas_RefreshManagedPrivateEndpoint /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -750,12 +816,12 @@ public virtual async Task RefreshManagedPrivateEndpointAsync(WaitU /// The cancellation token to use. public virtual ArmOperation RefreshManagedPrivateEndpoint(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedGrafanaResource.RefreshManagedPrivateEndpoint"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.RefreshManagedPrivateEndpoint"); scope.Start(); try { - var response = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Refresh(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new GrafanaArmOperation(_managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateRefreshRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _managedGrafanaRestClient.RefreshManagedPrivateEndpoint(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new GrafanaArmOperation(_managedGrafanaClientDiagnostics, Pipeline, _managedGrafanaRestClient.CreateRefreshManagedPrivateEndpointRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -776,11 +842,11 @@ public virtual ArmOperation RefreshManagedPrivateEndpoint(WaitUntil waitUntil, C /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -797,7 +863,7 @@ public virtual async Task> AddTagAsync(string k Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.AddTag"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.AddTag"); scope.Start(); try { @@ -806,7 +872,7 @@ public virtual async Task> AddTagAsync(string k 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 _managedGrafanaGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _managedGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ManagedGrafanaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -838,11 +904,11 @@ public virtual async Task> AddTagAsync(string k /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -859,7 +925,7 @@ public virtual Response AddTag(string key, string value, Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.AddTag"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.AddTag"); scope.Start(); try { @@ -868,7 +934,7 @@ public virtual Response AddTag(string key, string value, var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _managedGrafanaGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var originalResponse = _managedGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return Response.FromValue(new ManagedGrafanaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -900,11 +966,11 @@ public virtual Response AddTag(string key, string value, /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -919,7 +985,7 @@ public virtual async Task> SetTagsAsync(IDictio { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.SetTags"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.SetTags"); scope.Start(); try { @@ -929,7 +995,7 @@ public virtual async Task> SetTagsAsync(IDictio 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 _managedGrafanaGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _managedGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ManagedGrafanaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -957,11 +1023,11 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -976,7 +1042,7 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary SetTags(IDictionary /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1033,7 +1099,7 @@ public virtual async Task> RemoveTagAsync(strin { Argument.AssertNotNull(key, nameof(key)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.RemoveTag"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.RemoveTag"); scope.Start(); try { @@ -1042,7 +1108,7 @@ public virtual async Task> RemoveTagAsync(strin 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 _managedGrafanaGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _managedGrafanaRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ManagedGrafanaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -1074,11 +1140,11 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Operation Id - /// Grafana_Get + /// ManagedGrafana_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1093,7 +1159,7 @@ public virtual Response RemoveTag(string key, Cancellati { Argument.AssertNotNull(key, nameof(key)); - using var scope = _managedGrafanaGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.RemoveTag"); + using var scope = _managedGrafanaClientDiagnostics.CreateScope("ManagedGrafanaResource.RemoveTag"); scope.Start(); try { @@ -1102,7 +1168,7 @@ public virtual Response RemoveTag(string key, Cancellati var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _managedGrafanaGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var originalResponse = _managedGrafanaRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return Response.FromValue(new ManagedGrafanaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelCollection.cs index cf468d932502..bbe297c4857b 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelCollection.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelCollection.cs @@ -24,8 +24,8 @@ namespace Azure.ResourceManager.Grafana /// public partial class ManagedPrivateEndpointModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics; - private readonly ManagedPrivateEndpointsRestOperations _managedPrivateEndpointModelManagedPrivateEndpointsRestClient; + private readonly ClientDiagnostics _managedPrivateEndpointModelClientDiagnostics; + private readonly ManagedPrivateEndpointModelsRestOperations _managedPrivateEndpointModelRestClient; /// Initializes a new instance of the class for mocking. protected ManagedPrivateEndpointModelCollection() @@ -37,9 +37,9 @@ protected ManagedPrivateEndpointModelCollection() /// The identifier of the parent resource that is the target of operations. internal ManagedPrivateEndpointModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedPrivateEndpointModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ManagedPrivateEndpointModelResource.ResourceType, out string managedPrivateEndpointModelManagedPrivateEndpointsApiVersion); - _managedPrivateEndpointModelManagedPrivateEndpointsRestClient = new ManagedPrivateEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedPrivateEndpointModelManagedPrivateEndpointsApiVersion); + _managedPrivateEndpointModelClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedPrivateEndpointModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ManagedPrivateEndpointModelResource.ResourceType, out string managedPrivateEndpointModelApiVersion); + _managedPrivateEndpointModelRestClient = new ManagedPrivateEndpointModelsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedPrivateEndpointModelApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// ManagedPrivateEndpoints_Create + /// ManagedPrivateEndpointModel_Create /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -83,12 +83,12 @@ public virtual async Task> Cre Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.CreateOrUpdate"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, data, cancellationToken).ConfigureAwait(false); - var operation = new GrafanaArmOperation(new ManagedPrivateEndpointModelOperationSource(Client), _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, data).Request, response, OperationFinalStateVia.OriginalUri); + var response = await _managedPrivateEndpointModelRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, data, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(new ManagedPrivateEndpointModelOperationSource(Client), _managedPrivateEndpointModelClientDiagnostics, Pipeline, _managedPrivateEndpointModelRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -109,11 +109,11 @@ public virtual async Task> Cre /// /// /// Operation Id - /// ManagedPrivateEndpoints_Create + /// ManagedPrivateEndpointModel_Create /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -132,12 +132,12 @@ public virtual ArmOperation CreateOrUpdate( Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.CreateOrUpdate"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.CreateOrUpdate"); scope.Start(); try { - var response = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, data, cancellationToken); - var operation = new GrafanaArmOperation(new ManagedPrivateEndpointModelOperationSource(Client), _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, data).Request, response, OperationFinalStateVia.OriginalUri); + var response = _managedPrivateEndpointModelRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, data, cancellationToken); + var operation = new GrafanaArmOperation(new ManagedPrivateEndpointModelOperationSource(Client), _managedPrivateEndpointModelClientDiagnostics, Pipeline, _managedPrivateEndpointModelRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -178,11 +178,11 @@ public virtual async Task> GetAsyn { Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.Get"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.Get"); scope.Start(); try { - var response = await _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken).ConfigureAwait(false); + var response = await _managedPrivateEndpointModelRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, response.Value), response.GetRawResponse()); @@ -203,11 +203,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -223,11 +223,11 @@ public virtual Response Get(string managedP { Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.Get"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.Get"); scope.Start(); try { - var response = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken); + var response = _managedPrivateEndpointModelRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, response.Value), response.GetRawResponse()); @@ -248,11 +248,11 @@ public virtual Response Get(string managedP /// /// /// Operation Id - /// ManagedPrivateEndpoints_List + /// ManagedPrivateEndpointModel_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -264,9 +264,9 @@ public virtual Response Get(string managedP /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedPrivateEndpointModelResource(Client, ManagedPrivateEndpointModelData.DeserializeManagedPrivateEndpointModelData(e)), _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, "ManagedPrivateEndpointModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _managedPrivateEndpointModelRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedPrivateEndpointModelRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedPrivateEndpointModelResource(Client, ManagedPrivateEndpointModelData.DeserializeManagedPrivateEndpointModelData(e)), _managedPrivateEndpointModelClientDiagnostics, Pipeline, "ManagedPrivateEndpointModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Operation Id - /// ManagedPrivateEndpoints_List + /// ManagedPrivateEndpointModel_List /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -294,9 +294,9 @@ public virtual AsyncPageable GetAllAsync(Ca /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedPrivateEndpointModelResource(Client, ManagedPrivateEndpointModelData.DeserializeManagedPrivateEndpointModelData(e)), _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, "ManagedPrivateEndpointModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _managedPrivateEndpointModelRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedPrivateEndpointModelRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedPrivateEndpointModelResource(Client, ManagedPrivateEndpointModelData.DeserializeManagedPrivateEndpointModelData(e)), _managedPrivateEndpointModelClientDiagnostics, Pipeline, "ManagedPrivateEndpointModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -308,11 +308,11 @@ public virtual Pageable GetAll(Cancellation /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -328,11 +328,11 @@ public virtual async Task> ExistsAsync(string managedPrivateEndpo { Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.Exists"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.Exists"); scope.Start(); try { - var response = await _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _managedPrivateEndpointModelRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string managedPrivateEndpo /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -371,11 +371,11 @@ public virtual Response Exists(string managedPrivateEndpointName, Cancella { Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.Exists"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.Exists"); scope.Start(); try { - var response = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken: cancellationToken); + var response = _managedPrivateEndpointModelRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -394,11 +394,11 @@ public virtual Response Exists(string managedPrivateEndpointName, Cancella /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -414,11 +414,11 @@ public virtual async Task> { Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.GetIfExists"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.GetIfExists"); scope.Start(); try { - var response = await _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _managedPrivateEndpointModelRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, response.Value), response.GetRawResponse()); @@ -439,11 +439,11 @@ public virtual async Task> /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -459,11 +459,11 @@ public virtual NullableResponse GetIfExists { Argument.AssertNotNullOrEmpty(managedPrivateEndpointName, nameof(managedPrivateEndpointName)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.GetIfExists"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.GetIfExists"); scope.Start(); try { - var response = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken: cancellationToken); + var response = _managedPrivateEndpointModelRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedPrivateEndpointName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelResource.cs index b8c25ca7e898..e0c7693cbd8e 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelResource.cs @@ -35,8 +35,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics; - private readonly ManagedPrivateEndpointsRestOperations _managedPrivateEndpointModelManagedPrivateEndpointsRestClient; + private readonly ClientDiagnostics _managedPrivateEndpointModelClientDiagnostics; + private readonly ManagedPrivateEndpointModelsRestOperations _managedPrivateEndpointModelRestClient; private readonly ManagedPrivateEndpointModelData _data; /// Gets the resource type for the operations. @@ -61,9 +61,9 @@ internal ManagedPrivateEndpointModelResource(ArmClient client, ManagedPrivateEnd /// The identifier of the resource that is the target of operations. internal ManagedPrivateEndpointModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string managedPrivateEndpointModelManagedPrivateEndpointsApiVersion); - _managedPrivateEndpointModelManagedPrivateEndpointsRestClient = new ManagedPrivateEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedPrivateEndpointModelManagedPrivateEndpointsApiVersion); + _managedPrivateEndpointModelClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string managedPrivateEndpointModelApiVersion); + _managedPrivateEndpointModelRestClient = new ManagedPrivateEndpointModelsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedPrivateEndpointModelApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -99,11 +99,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -114,11 +114,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Get"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Get"); scope.Start(); try { - var response = await _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _managedPrivateEndpointModelRestClient.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 ManagedPrivateEndpointModelResource(Client, response.Value), response.GetRawResponse()); @@ -139,11 +139,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -154,11 +154,11 @@ public virtual async Task> GetAsyn /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Get"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Get"); scope.Start(); try { - var response = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _managedPrivateEndpointModelRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, response.Value), response.GetRawResponse()); @@ -179,11 +179,11 @@ public virtual Response Get(CancellationTok /// /// /// Operation Id - /// ManagedPrivateEndpoints_Delete + /// ManagedPrivateEndpointModel_Delete /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -195,12 +195,12 @@ public virtual Response Get(CancellationTok /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Delete"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Delete"); scope.Start(); try { - var response = await _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new GrafanaArmOperation(_managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _managedPrivateEndpointModelRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(_managedPrivateEndpointModelClientDiagnostics, Pipeline, _managedPrivateEndpointModelRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -221,11 +221,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// ManagedPrivateEndpoints_Delete + /// ManagedPrivateEndpointModel_Delete /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -237,12 +237,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Delete"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Delete"); scope.Start(); try { - var response = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new GrafanaArmOperation(_managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _managedPrivateEndpointModelRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new GrafanaArmOperation(_managedPrivateEndpointModelClientDiagnostics, Pipeline, _managedPrivateEndpointModelRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -263,11 +263,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// ManagedPrivateEndpoints_Update + /// ManagedPrivateEndpointModel_Update /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -283,12 +283,12 @@ public virtual async Task> Upd { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Update"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Update"); scope.Start(); try { - var response = await _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new GrafanaArmOperation(new ManagedPrivateEndpointModelOperationSource(Client), _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _managedPrivateEndpointModelRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new GrafanaArmOperation(new ManagedPrivateEndpointModelOperationSource(Client), _managedPrivateEndpointModelClientDiagnostics, Pipeline, _managedPrivateEndpointModelRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -309,11 +309,11 @@ public virtual async Task> Upd /// /// /// Operation Id - /// ManagedPrivateEndpoints_Update + /// ManagedPrivateEndpointModel_Update /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -329,12 +329,12 @@ public virtual ArmOperation Update(WaitUnti { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Update"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.Update"); scope.Start(); try { - var response = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new GrafanaArmOperation(new ManagedPrivateEndpointModelOperationSource(Client), _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics, Pipeline, _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _managedPrivateEndpointModelRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new GrafanaArmOperation(new ManagedPrivateEndpointModelOperationSource(Client), _managedPrivateEndpointModelClientDiagnostics, Pipeline, _managedPrivateEndpointModelRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -355,11 +355,11 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -376,7 +376,7 @@ public virtual async Task> AddTagA Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.AddTag"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.AddTag"); scope.Start(); try { @@ -385,7 +385,7 @@ public virtual async Task> AddTagA 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 _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _managedPrivateEndpointModelRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -417,11 +417,11 @@ public virtual async Task> AddTagA /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -438,7 +438,7 @@ public virtual Response AddTag(string key, Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.AddTag"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.AddTag"); scope.Start(); try { @@ -447,7 +447,7 @@ public virtual Response AddTag(string key, var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var originalResponse = _managedPrivateEndpointModelRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -479,11 +479,11 @@ public virtual Response AddTag(string key, /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -498,7 +498,7 @@ public virtual async Task> SetTags { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.SetTags"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.SetTags"); scope.Start(); try { @@ -508,7 +508,7 @@ public virtual async Task> SetTags 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 _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _managedPrivateEndpointModelRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -536,11 +536,11 @@ public virtual async Task> SetTags /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -555,7 +555,7 @@ public virtual Response SetTags(IDictionary { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.SetTags"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.SetTags"); scope.Start(); try { @@ -565,7 +565,7 @@ public virtual Response SetTags(IDictionary var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var originalResponse = _managedPrivateEndpointModelRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -593,11 +593,11 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -612,7 +612,7 @@ public virtual async Task> RemoveT { Argument.AssertNotNull(key, nameof(key)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.RemoveTag"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.RemoveTag"); scope.Start(); try { @@ -621,7 +621,7 @@ public virtual async Task> RemoveT 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 _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _managedPrivateEndpointModelRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -653,11 +653,11 @@ public virtual async Task> RemoveT /// /// /// Operation Id - /// ManagedPrivateEndpoints_Get + /// ManagedPrivateEndpointModel_Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-11-01-preview /// /// /// Resource @@ -672,7 +672,7 @@ public virtual Response RemoveTag(string ke { Argument.AssertNotNull(key, nameof(key)); - using var scope = _managedPrivateEndpointModelManagedPrivateEndpointsClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.RemoveTag"); + using var scope = _managedPrivateEndpointModelClientDiagnostics.CreateScope("ManagedPrivateEndpointModelResource.RemoveTag"); scope.Start(); try { @@ -681,7 +681,7 @@ public virtual Response RemoveTag(string ke var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _managedPrivateEndpointModelManagedPrivateEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var originalResponse = _managedPrivateEndpointModelRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return Response.FromValue(new ManagedPrivateEndpointModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaConfigurations.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaConfigurations.Serialization.cs index 3b44deca4b31..cf9dd5c470e1 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaConfigurations.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaConfigurations.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.Grafana.Models { - internal partial class GrafanaConfigurations : IUtf8JsonSerializable, IJsonModel + public partial class GrafanaConfigurations : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -39,6 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("smtp"u8); writer.WriteObjectValue(Smtp, options); } + if (Optional.IsDefined(Snapshots)) + { + writer.WritePropertyName("snapshots"u8); + writer.WriteObjectValue(Snapshots, options); + } + if (Optional.IsDefined(Users)) + { + writer.WritePropertyName("users"u8); + writer.WriteObjectValue(Users, options); + } + if (Optional.IsDefined(Security)) + { + writer.WritePropertyName("security"u8); + writer.WriteObjectValue(Security, options); + } + if (Optional.IsDefined(UnifiedAlertingScreenshots)) + { + writer.WritePropertyName("unifiedAlertingScreenshots"u8); + writer.WriteObjectValue(UnifiedAlertingScreenshots, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,7 +96,11 @@ internal static GrafanaConfigurations DeserializeGrafanaConfigurations(JsonEleme { return null; } - Smtp smtp = default; + GrafanaSmtpSettings smtp = default; + GrafanaSnapshotsSettings snapshots = default; + GrafanaUserSettings users = default; + GrafanaSecuritySettings security = default; + UnifiedAlertingScreenshots unifiedAlertingScreenshots = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -87,7 +111,43 @@ internal static GrafanaConfigurations DeserializeGrafanaConfigurations(JsonEleme { continue; } - smtp = Smtp.DeserializeSmtp(property.Value, options); + smtp = GrafanaSmtpSettings.DeserializeGrafanaSmtpSettings(property.Value, options); + continue; + } + if (property.NameEquals("snapshots"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshots = GrafanaSnapshotsSettings.DeserializeGrafanaSnapshotsSettings(property.Value, options); + continue; + } + if (property.NameEquals("users"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + users = GrafanaUserSettings.DeserializeGrafanaUserSettings(property.Value, options); + continue; + } + if (property.NameEquals("security"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + security = GrafanaSecuritySettings.DeserializeGrafanaSecuritySettings(property.Value, options); + continue; + } + if (property.NameEquals("unifiedAlertingScreenshots"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + unifiedAlertingScreenshots = UnifiedAlertingScreenshots.DeserializeUnifiedAlertingScreenshots(property.Value, options); continue; } if (options.Format != "W") @@ -96,7 +156,13 @@ internal static GrafanaConfigurations DeserializeGrafanaConfigurations(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new GrafanaConfigurations(smtp, serializedAdditionalRawData); + return new GrafanaConfigurations( + smtp, + snapshots, + users, + security, + unifiedAlertingScreenshots, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaConfigurations.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaConfigurations.cs index 352f5475820f..88091195ad48 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaConfigurations.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaConfigurations.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Grafana.Models { /// Server configurations of a Grafana instance. - internal partial class GrafanaConfigurations + public partial class GrafanaConfigurations { /// /// Keeps track of any properties unknown to the library. @@ -55,10 +55,18 @@ public GrafanaConfigurations() /// Email server settings. /// https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp /// + /// Grafana Snapshots settings. + /// Grafana users settings. + /// Grafana security settings. + /// Grafana Unified Alerting Screenshots settings. /// Keeps track of any properties unknown to the library. - internal GrafanaConfigurations(Smtp smtp, IDictionary serializedAdditionalRawData) + internal GrafanaConfigurations(GrafanaSmtpSettings smtp, GrafanaSnapshotsSettings snapshots, GrafanaUserSettings users, GrafanaSecuritySettings security, UnifiedAlertingScreenshots unifiedAlertingScreenshots, IDictionary serializedAdditionalRawData) { Smtp = smtp; + Snapshots = snapshots; + Users = users; + Security = security; + UnifiedAlertingScreenshots = unifiedAlertingScreenshots; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -66,6 +74,49 @@ internal GrafanaConfigurations(Smtp smtp, IDictionary serial /// Email server settings. /// https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp /// - public Smtp Smtp { get; set; } + public GrafanaSmtpSettings Smtp { get; set; } + /// Grafana Snapshots settings. + internal GrafanaSnapshotsSettings Snapshots { get; set; } + /// Set to false to disable external snapshot publish endpoint. + public bool? IsExternalEnabled + { + get => Snapshots is null ? default : Snapshots.IsExternalEnabled; + set + { + if (Snapshots is null) + Snapshots = new GrafanaSnapshotsSettings(); + Snapshots.IsExternalEnabled = value; + } + } + + /// Grafana users settings. + public GrafanaUserSettings Users { get; set; } + /// Grafana security settings. + internal GrafanaSecuritySettings Security { get; set; } + /// Set to true to execute the CSRF check even if the login cookie is not in a request (default false). + public bool? IsCsrfAlwaysCheckEnabled + { + get => Security is null ? default : Security.IsCsrfAlwaysCheckEnabled; + set + { + if (Security is null) + Security = new GrafanaSecuritySettings(); + Security.IsCsrfAlwaysCheckEnabled = value; + } + } + + /// Grafana Unified Alerting Screenshots settings. + internal UnifiedAlertingScreenshots UnifiedAlertingScreenshots { get; set; } + /// Set to false to disable capture screenshot in Unified Alert due to performance issue. + public bool? IsCaptureEnabled + { + get => UnifiedAlertingScreenshots is null ? default : UnifiedAlertingScreenshots.IsCaptureEnabled; + set + { + if (UnifiedAlertingScreenshots is null) + UnifiedAlertingScreenshots = new UnifiedAlertingScreenshots(); + UnifiedAlertingScreenshots.IsCaptureEnabled = value; + } + } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricPatch.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricPatch.Serialization.cs new file mode 100644 index 000000000000..e0b0f4a76379 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricPatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.Grafana.Models +{ + public partial class GrafanaIntegrationFabricPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GrafanaIntegrationFabricPatch)} 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 (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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GrafanaIntegrationFabricPatch 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(GrafanaIntegrationFabricPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGrafanaIntegrationFabricPatch(document.RootElement, options); + } + + internal static GrafanaIntegrationFabricPatch DeserializeGrafanaIntegrationFabricPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IntegrationFabricPropertiesUpdateParameters properties = 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) + { + continue; + } + properties = IntegrationFabricPropertiesUpdateParameters.DeserializeIntegrationFabricPropertiesUpdateParameters(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GrafanaIntegrationFabricPatch(tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(GrafanaIntegrationFabricPatch)} does not support writing '{options.Format}' format."); + } + } + + GrafanaIntegrationFabricPatch 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGrafanaIntegrationFabricPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GrafanaIntegrationFabricPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricPatch.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricPatch.cs new file mode 100644 index 000000000000..f8feceed6ddc --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricPatch.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; + +namespace Azure.ResourceManager.Grafana.Models +{ + /// The parameters for a PATCH request to a Integration Fabric resource. + public partial class GrafanaIntegrationFabricPatch + { + /// + /// 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 GrafanaIntegrationFabricPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The new tags of the Integration Fabric resource. + /// The new properties of this Integration Fabric resource. + /// Keeps track of any properties unknown to the library. + internal GrafanaIntegrationFabricPatch(IDictionary tags, IntegrationFabricPropertiesUpdateParameters properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The new tags of the Integration Fabric resource. + public IDictionary Tags { get; } + /// The new properties of this Integration Fabric resource. + internal IntegrationFabricPropertiesUpdateParameters Properties { get; set; } + /// The new integration scenarios covered by this integration fabric. + public IList IntegrationFabricPropertiesUpdateParametersScenarios + { + get + { + if (Properties is null) + Properties = new IntegrationFabricPropertiesUpdateParameters(); + return Properties.Scenarios; + } + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricProperties.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricProperties.Serialization.cs new file mode 100644 index 000000000000..19d97eabe233 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricProperties.Serialization.cs @@ -0,0 +1,188 @@ +// 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.Grafana.Models +{ + public partial class GrafanaIntegrationFabricProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GrafanaIntegrationFabricProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(TargetResourceId)) + { + writer.WritePropertyName("targetResourceId"u8); + writer.WriteStringValue(TargetResourceId); + } + if (Optional.IsDefined(DataSourceResourceId)) + { + writer.WritePropertyName("dataSourceResourceId"u8); + writer.WriteStringValue(DataSourceResourceId); + } + if (Optional.IsCollectionDefined(Scenarios)) + { + writer.WritePropertyName("scenarios"u8); + writer.WriteStartArray(); + foreach (var item in Scenarios) + { + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GrafanaIntegrationFabricProperties 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(GrafanaIntegrationFabricProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGrafanaIntegrationFabricProperties(document.RootElement, options); + } + + internal static GrafanaIntegrationFabricProperties DeserializeGrafanaIntegrationFabricProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GrafanaProvisioningState? provisioningState = default; + ResourceIdentifier targetResourceId = default; + ResourceIdentifier dataSourceResourceId = default; + IList scenarios = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new GrafanaProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataSourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("scenarios"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scenarios = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GrafanaIntegrationFabricProperties(provisioningState, targetResourceId, dataSourceResourceId, scenarios ?? 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(GrafanaIntegrationFabricProperties)} does not support writing '{options.Format}' format."); + } + } + + GrafanaIntegrationFabricProperties 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGrafanaIntegrationFabricProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GrafanaIntegrationFabricProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricProperties.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricProperties.cs new file mode 100644 index 000000000000..e0840841b4ae --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaIntegrationFabricProperties.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; + +namespace Azure.ResourceManager.Grafana.Models +{ + /// The GrafanaIntegrationFabricProperties. + public partial class GrafanaIntegrationFabricProperties + { + /// + /// 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 GrafanaIntegrationFabricProperties() + { + Scenarios = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Provisioning state of the resource. + /// The resource Id of the Azure resource being integrated with Azure Managed Grafana. E.g., an Azure Kubernetes Service cluster. + /// The resource Id of the Azure resource which is used to configure Grafana data source. E.g., an Azure Monitor Workspace, an Azure Data Explorer cluster, etc. + /// A list of integration scenarios covered by this integration fabric. + /// Keeps track of any properties unknown to the library. + internal GrafanaIntegrationFabricProperties(GrafanaProvisioningState? provisioningState, ResourceIdentifier targetResourceId, ResourceIdentifier dataSourceResourceId, IList scenarios, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + TargetResourceId = targetResourceId; + DataSourceResourceId = dataSourceResourceId; + Scenarios = scenarios; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Provisioning state of the resource. + public GrafanaProvisioningState? ProvisioningState { get; } + /// The resource Id of the Azure resource being integrated with Azure Managed Grafana. E.g., an Azure Kubernetes Service cluster. + public ResourceIdentifier TargetResourceId { get; set; } + /// The resource Id of the Azure resource which is used to configure Grafana data source. E.g., an Azure Monitor Workspace, an Azure Data Explorer cluster, etc. + public ResourceIdentifier DataSourceResourceId { get; set; } + /// A list of integration scenarios covered by this integration fabric. + public IList Scenarios { get; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionListResult.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionListResult.Serialization.cs index 33f0adc72408..1172d6259940 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionListResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GrafanaPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - if (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 GrafanaPrivateEndpointConnectionListResult DeserializeGrafanaPri 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 GrafanaPrivateEndpointConnectionListResult DeserializeGrafanaPri } 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 GrafanaPrivateEndpointConnectionListResult DeserializeGrafanaPri } } serializedAdditionalRawData = rawDataDictionary; - return new GrafanaPrivateEndpointConnectionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new GrafanaPrivateEndpointConnectionListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionListResult.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionListResult.cs index 2de180b4d1f3..05d99c57e0d9 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionListResult.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Grafana.Models { - /// List of private endpoint connection associated with the specified storage account. + /// The response of a PrivateEndpointConnection list operation. internal partial class GrafanaPrivateEndpointConnectionListResult { /// @@ -46,25 +47,34 @@ internal partial class GrafanaPrivateEndpointConnectionListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal GrafanaPrivateEndpointConnectionListResult() + /// The PrivateEndpointConnection items on this page. + /// is null. + internal GrafanaPrivateEndpointConnectionListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Array of private endpoint connections. - /// URL to get the next set of operation list results (if there are any). + /// The PrivateEndpointConnection items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal GrafanaPrivateEndpointConnectionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal GrafanaPrivateEndpointConnectionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Array of private endpoint connections. + /// Initializes a new instance of for deserialization. + internal GrafanaPrivateEndpointConnectionListResult() + { + } + + /// The PrivateEndpointConnection items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of operation list results (if there are any). - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionProvisioningState.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionProvisioningState.cs index 49f41bb9e0fd..9574347c92fe 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionProvisioningState.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointConnectionProvisioningState.cs @@ -27,13 +27,13 @@ public GrafanaPrivateEndpointConnectionProvisioningState(string value) private const string DeletingValue = "Deleting"; private const string FailedValue = "Failed"; - /// Succeeded. + /// Connection has been provisioned. public static GrafanaPrivateEndpointConnectionProvisioningState Succeeded { get; } = new GrafanaPrivateEndpointConnectionProvisioningState(SucceededValue); - /// Creating. + /// Connection is being created. public static GrafanaPrivateEndpointConnectionProvisioningState Creating { get; } = new GrafanaPrivateEndpointConnectionProvisioningState(CreatingValue); - /// Deleting. + /// Connection is being deleted. public static GrafanaPrivateEndpointConnectionProvisioningState Deleting { get; } = new GrafanaPrivateEndpointConnectionProvisioningState(DeletingValue); - /// Failed. + /// Connection provisioning has failed. public static GrafanaPrivateEndpointConnectionProvisioningState Failed { get; } = new GrafanaPrivateEndpointConnectionProvisioningState(FailedValue); /// Determines if two values are the same. public static bool operator ==(GrafanaPrivateEndpointConnectionProvisioningState left, GrafanaPrivateEndpointConnectionProvisioningState right) => left.Equals(right); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointServiceConnectionStatus.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointServiceConnectionStatus.cs index 493423fc81d1..9906187ede71 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointServiceConnectionStatus.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateEndpointServiceConnectionStatus.cs @@ -26,11 +26,11 @@ public GrafanaPrivateEndpointServiceConnectionStatus(string value) private const string ApprovedValue = "Approved"; private const string RejectedValue = "Rejected"; - /// Pending. + /// Connection waiting for approval or rejection. public static GrafanaPrivateEndpointServiceConnectionStatus Pending { get; } = new GrafanaPrivateEndpointServiceConnectionStatus(PendingValue); - /// Approved. + /// Connection approved. public static GrafanaPrivateEndpointServiceConnectionStatus Approved { get; } = new GrafanaPrivateEndpointServiceConnectionStatus(ApprovedValue); - /// Rejected. + /// Connection Rejected. public static GrafanaPrivateEndpointServiceConnectionStatus Rejected { get; } = new GrafanaPrivateEndpointServiceConnectionStatus(RejectedValue); /// Determines if two values are the same. public static bool operator ==(GrafanaPrivateEndpointServiceConnectionStatus left, GrafanaPrivateEndpointServiceConnectionStatus right) => left.Equals(right); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateLinkResourceListResult.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateLinkResourceListResult.Serialization.cs index d6f430bb0c9f..26bef366d0a6 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateLinkResourceListResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GrafanaPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - if (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 GrafanaPrivateLinkResourceListResult DeserializeGrafanaPrivateLi 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 GrafanaPrivateLinkResourceListResult DeserializeGrafanaPrivateLi } 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 GrafanaPrivateLinkResourceListResult DeserializeGrafanaPrivateLi } } serializedAdditionalRawData = rawDataDictionary; - return new GrafanaPrivateLinkResourceListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new GrafanaPrivateLinkResourceListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateLinkResourceListResult.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateLinkResourceListResult.cs index cbbb2163ad22..3869d366ce62 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateLinkResourceListResult.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaPrivateLinkResourceListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Grafana.Models { - /// A list of private link resources. + /// The response of a PrivateLinkResource list operation. internal partial class GrafanaPrivateLinkResourceListResult { /// @@ -46,25 +47,34 @@ internal partial class GrafanaPrivateLinkResourceListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal GrafanaPrivateLinkResourceListResult() + /// The PrivateLinkResource items on this page. + /// is null. + internal GrafanaPrivateLinkResourceListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Array of private link resources. - /// URL to get the next set of operation list results (if there are any). + /// The PrivateLinkResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal GrafanaPrivateLinkResourceListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal GrafanaPrivateLinkResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Array of private link resources. + /// Initializes a new instance of for deserialization. + internal GrafanaPrivateLinkResourceListResult() + { + } + + /// The PrivateLinkResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of operation list results (if there are any). - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSecuritySettings.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSecuritySettings.Serialization.cs new file mode 100644 index 000000000000..ba0c06ef5acd --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSecuritySettings.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.Grafana.Models +{ + internal partial class GrafanaSecuritySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GrafanaSecuritySettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsCsrfAlwaysCheckEnabled)) + { + writer.WritePropertyName("csrfAlwaysCheck"u8); + writer.WriteBooleanValue(IsCsrfAlwaysCheckEnabled.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GrafanaSecuritySettings 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(GrafanaSecuritySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGrafanaSecuritySettings(document.RootElement, options); + } + + internal static GrafanaSecuritySettings DeserializeGrafanaSecuritySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? csrfAlwaysCheck = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("csrfAlwaysCheck"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + csrfAlwaysCheck = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GrafanaSecuritySettings(csrfAlwaysCheck, 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(GrafanaSecuritySettings)} does not support writing '{options.Format}' format."); + } + } + + GrafanaSecuritySettings 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGrafanaSecuritySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GrafanaSecuritySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSecuritySettings.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSecuritySettings.cs new file mode 100644 index 000000000000..ae4cd1351508 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSecuritySettings.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.Grafana.Models +{ + /// Grafana security settings. + internal partial class GrafanaSecuritySettings + { + /// + /// 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 GrafanaSecuritySettings() + { + } + + /// Initializes a new instance of . + /// Set to true to execute the CSRF check even if the login cookie is not in a request (default false). + /// Keeps track of any properties unknown to the library. + internal GrafanaSecuritySettings(bool? isCsrfAlwaysCheckEnabled, IDictionary serializedAdditionalRawData) + { + IsCsrfAlwaysCheckEnabled = isCsrfAlwaysCheckEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Set to true to execute the CSRF check even if the login cookie is not in a request (default false). + public bool? IsCsrfAlwaysCheckEnabled { get; set; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSmtpSettings.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSmtpSettings.Serialization.cs new file mode 100644 index 000000000000..5b4c6fb1de06 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSmtpSettings.Serialization.cs @@ -0,0 +1,227 @@ +// 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.Grafana.Models +{ + public partial class GrafanaSmtpSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GrafanaSmtpSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(Host)) + { + writer.WritePropertyName("host"u8); + writer.WriteStringValue(Host); + } + if (Optional.IsDefined(User)) + { + writer.WritePropertyName("user"u8); + writer.WriteStringValue(User); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(FromAddress)) + { + writer.WritePropertyName("fromAddress"u8); + writer.WriteStringValue(FromAddress); + } + if (Optional.IsDefined(FromName)) + { + writer.WritePropertyName("fromName"u8); + writer.WriteStringValue(FromName); + } + if (Optional.IsDefined(StartTLSPolicy)) + { + writer.WritePropertyName("startTLSPolicy"u8); + writer.WriteStringValue(StartTLSPolicy.Value.ToString()); + } + if (Optional.IsDefined(SkipVerify)) + { + writer.WritePropertyName("skipVerify"u8); + writer.WriteBooleanValue(SkipVerify.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GrafanaSmtpSettings 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(GrafanaSmtpSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGrafanaSmtpSettings(document.RootElement, options); + } + + internal static GrafanaSmtpSettings DeserializeGrafanaSmtpSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + string host = default; + string user = default; + string password = default; + string fromAddress = default; + string fromName = default; + GrafanaStartTlsPolicy? startTLSPolicy = default; + bool? skipVerify = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("host"u8)) + { + host = property.Value.GetString(); + continue; + } + if (property.NameEquals("user"u8)) + { + user = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("fromAddress"u8)) + { + fromAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("fromName"u8)) + { + fromName = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTLSPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTLSPolicy = new GrafanaStartTlsPolicy(property.Value.GetString()); + continue; + } + if (property.NameEquals("skipVerify"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + skipVerify = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GrafanaSmtpSettings( + enabled, + host, + user, + password, + fromAddress, + fromName, + startTLSPolicy, + skipVerify, + 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(GrafanaSmtpSettings)} does not support writing '{options.Format}' format."); + } + } + + GrafanaSmtpSettings 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGrafanaSmtpSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GrafanaSmtpSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSmtpSettings.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSmtpSettings.cs new file mode 100644 index 000000000000..aeff703e5f9d --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSmtpSettings.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Grafana.Models +{ + /// + /// Email server settings. + /// https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp + /// + public partial class GrafanaSmtpSettings + { + /// + /// 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 GrafanaSmtpSettings() + { + } + + /// Initializes a new instance of . + /// Enable this to allow Grafana to send email. Default is false. + /// SMTP server hostname with port, e.g. test.email.net:587. + /// User of SMTP auth. + /// Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes. + /// + /// Address used when sending out emails + /// https://pkg.go.dev/net/mail#Address + /// + /// + /// Name to be used when sending out emails. Default is "Azure Managed Grafana Notification" + /// https://pkg.go.dev/net/mail#Address + /// + /// + /// The StartTLSPolicy setting of the SMTP configuration + /// https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy + /// + /// + /// Verify SSL for SMTP server. Default is false + /// https://pkg.go.dev/crypto/tls#Config + /// + /// Keeps track of any properties unknown to the library. + internal GrafanaSmtpSettings(bool? isEnabled, string host, string user, string password, string fromAddress, string fromName, GrafanaStartTlsPolicy? startTLSPolicy, bool? skipVerify, IDictionary serializedAdditionalRawData) + { + IsEnabled = isEnabled; + Host = host; + User = user; + Password = password; + FromAddress = fromAddress; + FromName = fromName; + StartTLSPolicy = startTLSPolicy; + SkipVerify = skipVerify; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enable this to allow Grafana to send email. Default is false. + public bool? IsEnabled { get; set; } + /// SMTP server hostname with port, e.g. test.email.net:587. + public string Host { get; set; } + /// User of SMTP auth. + public string User { get; set; } + /// Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes. + public string Password { get; set; } + /// + /// Address used when sending out emails + /// https://pkg.go.dev/net/mail#Address + /// + public string FromAddress { get; set; } + /// + /// Name to be used when sending out emails. Default is "Azure Managed Grafana Notification" + /// https://pkg.go.dev/net/mail#Address + /// + public string FromName { get; set; } + /// + /// The StartTLSPolicy setting of the SMTP configuration + /// https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy + /// + public GrafanaStartTlsPolicy? StartTLSPolicy { get; set; } + /// + /// Verify SSL for SMTP server. Default is false + /// https://pkg.go.dev/crypto/tls#Config + /// + public bool? SkipVerify { get; set; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSnapshotsSettings.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSnapshotsSettings.Serialization.cs new file mode 100644 index 000000000000..a0ac91386a96 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSnapshotsSettings.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.Grafana.Models +{ + internal partial class GrafanaSnapshotsSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GrafanaSnapshotsSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsExternalEnabled)) + { + writer.WritePropertyName("externalEnabled"u8); + writer.WriteBooleanValue(IsExternalEnabled.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GrafanaSnapshotsSettings 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(GrafanaSnapshotsSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGrafanaSnapshotsSettings(document.RootElement, options); + } + + internal static GrafanaSnapshotsSettings DeserializeGrafanaSnapshotsSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? externalEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + externalEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GrafanaSnapshotsSettings(externalEnabled, 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(GrafanaSnapshotsSettings)} does not support writing '{options.Format}' format."); + } + } + + GrafanaSnapshotsSettings 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGrafanaSnapshotsSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GrafanaSnapshotsSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSnapshotsSettings.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSnapshotsSettings.cs new file mode 100644 index 000000000000..ddbcd3e3b568 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaSnapshotsSettings.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.Grafana.Models +{ + /// Grafana Snapshots settings. + internal partial class GrafanaSnapshotsSettings + { + /// + /// 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 GrafanaSnapshotsSettings() + { + } + + /// Initializes a new instance of . + /// Set to false to disable external snapshot publish endpoint. + /// Keeps track of any properties unknown to the library. + internal GrafanaSnapshotsSettings(bool? isExternalEnabled, IDictionary serializedAdditionalRawData) + { + IsExternalEnabled = isExternalEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Set to false to disable external snapshot publish endpoint. + public bool? IsExternalEnabled { get; set; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaStartTlsPolicy.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaStartTlsPolicy.cs new file mode 100644 index 000000000000..d609268e6e8f --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaStartTlsPolicy.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.Grafana.Models +{ + /// + /// The StartTLSPolicy setting of the SMTP configuration + /// https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy + /// + public readonly partial struct GrafanaStartTlsPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GrafanaStartTlsPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OpportunisticStartTlsValue = "OpportunisticStartTLS"; + private const string MandatoryStartTlsValue = "MandatoryStartTLS"; + private const string NoStartTlsValue = "NoStartTLS"; + + /// OpportunisticStartTLS. + public static GrafanaStartTlsPolicy OpportunisticStartTls { get; } = new GrafanaStartTlsPolicy(OpportunisticStartTlsValue); + /// MandatoryStartTLS. + public static GrafanaStartTlsPolicy MandatoryStartTls { get; } = new GrafanaStartTlsPolicy(MandatoryStartTlsValue); + /// NoStartTLS. + public static GrafanaStartTlsPolicy NoStartTls { get; } = new GrafanaStartTlsPolicy(NoStartTlsValue); + /// Determines if two values are the same. + public static bool operator ==(GrafanaStartTlsPolicy left, GrafanaStartTlsPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GrafanaStartTlsPolicy left, GrafanaStartTlsPolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator GrafanaStartTlsPolicy(string value) => new GrafanaStartTlsPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GrafanaStartTlsPolicy other && Equals(other); + /// + public bool Equals(GrafanaStartTlsPolicy 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/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaUserSettings.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaUserSettings.Serialization.cs new file mode 100644 index 000000000000..c0de83838c77 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaUserSettings.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.Grafana.Models +{ + public partial class GrafanaUserSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GrafanaUserSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ViewersCanEdit)) + { + writer.WritePropertyName("viewersCanEdit"u8); + writer.WriteBooleanValue(ViewersCanEdit.Value); + } + if (Optional.IsDefined(EditorsCanAdmin)) + { + writer.WritePropertyName("editorsCanAdmin"u8); + writer.WriteBooleanValue(EditorsCanAdmin.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GrafanaUserSettings 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(GrafanaUserSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGrafanaUserSettings(document.RootElement, options); + } + + internal static GrafanaUserSettings DeserializeGrafanaUserSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? viewersCanEdit = default; + bool? editorsCanAdmin = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("viewersCanEdit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + viewersCanEdit = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("editorsCanAdmin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + editorsCanAdmin = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GrafanaUserSettings(viewersCanEdit, editorsCanAdmin, 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(GrafanaUserSettings)} does not support writing '{options.Format}' format."); + } + } + + GrafanaUserSettings 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGrafanaUserSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GrafanaUserSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaUserSettings.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaUserSettings.cs new file mode 100644 index 000000000000..0cfcb8e130b1 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/GrafanaUserSettings.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.Grafana.Models +{ + /// Grafana users settings. + public partial class GrafanaUserSettings + { + /// + /// 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 GrafanaUserSettings() + { + } + + /// Initializes a new instance of . + /// Set to true so viewers can access and use explore and perform temporary edits on panels in dashboards they have access to. They cannot save their changes. + /// Set to true so editors can administrate dashboards, folders and teams they create. + /// Keeps track of any properties unknown to the library. + internal GrafanaUserSettings(bool? viewersCanEdit, bool? editorsCanAdmin, IDictionary serializedAdditionalRawData) + { + ViewersCanEdit = viewersCanEdit; + EditorsCanAdmin = editorsCanAdmin; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Set to true so viewers can access and use explore and perform temporary edits on panels in dashboards they have access to. They cannot save their changes. + public bool? ViewersCanEdit { get; set; } + /// Set to true so editors can administrate dashboards, folders and teams they create. + public bool? EditorsCanAdmin { get; set; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricListResponse.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricListResponse.Serialization.cs new file mode 100644 index 000000000000..253dbb37b8a4 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricListResponse.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.Grafana.Models +{ + internal partial class IntegrationFabricListResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(IntegrationFabricListResponse)} 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IntegrationFabricListResponse 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(IntegrationFabricListResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIntegrationFabricListResponse(document.RootElement, options); + } + + internal static IntegrationFabricListResponse DeserializeIntegrationFabricListResponse(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(GrafanaIntegrationFabricData.DeserializeGrafanaIntegrationFabricData(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 IntegrationFabricListResponse(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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(IntegrationFabricListResponse)} does not support writing '{options.Format}' format."); + } + } + + IntegrationFabricListResponse 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeIntegrationFabricListResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IntegrationFabricListResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricListResponse.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricListResponse.cs new file mode 100644 index 000000000000..4bdee87c2ef5 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricListResponse.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.Grafana.Models +{ + /// Paged collection of IntegrationFabric items. + internal partial class IntegrationFabricListResponse + { + /// + /// 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 IntegrationFabric items on this page. + /// is null. + internal IntegrationFabricListResponse(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The IntegrationFabric items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal IntegrationFabricListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IntegrationFabricListResponse() + { + } + + /// The IntegrationFabric items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricPropertiesUpdateParameters.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricPropertiesUpdateParameters.Serialization.cs new file mode 100644 index 000000000000..d44e72ba1ecf --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricPropertiesUpdateParameters.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.ResourceManager.Grafana.Models +{ + internal partial class IntegrationFabricPropertiesUpdateParameters : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(IntegrationFabricPropertiesUpdateParameters)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Scenarios)) + { + writer.WritePropertyName("scenarios"u8); + writer.WriteStartArray(); + foreach (var item in Scenarios) + { + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IntegrationFabricPropertiesUpdateParameters 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(IntegrationFabricPropertiesUpdateParameters)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIntegrationFabricPropertiesUpdateParameters(document.RootElement, options); + } + + internal static IntegrationFabricPropertiesUpdateParameters DeserializeIntegrationFabricPropertiesUpdateParameters(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList scenarios = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scenarios"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scenarios = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IntegrationFabricPropertiesUpdateParameters(scenarios ?? 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(IntegrationFabricPropertiesUpdateParameters)} does not support writing '{options.Format}' format."); + } + } + + IntegrationFabricPropertiesUpdateParameters 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeIntegrationFabricPropertiesUpdateParameters(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IntegrationFabricPropertiesUpdateParameters)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricPropertiesUpdateParameters.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricPropertiesUpdateParameters.cs new file mode 100644 index 000000000000..f170c39b6005 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/IntegrationFabricPropertiesUpdateParameters.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.Grafana.Models +{ + /// The IntegrationFabricPropertiesUpdateParameters. + internal partial class IntegrationFabricPropertiesUpdateParameters + { + /// + /// 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 IntegrationFabricPropertiesUpdateParameters() + { + Scenarios = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The new integration scenarios covered by this integration fabric. + /// Keeps track of any properties unknown to the library. + internal IntegrationFabricPropertiesUpdateParameters(IList scenarios, IDictionary serializedAdditionalRawData) + { + Scenarios = scenarios; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The new integration scenarios covered by this integration fabric. + public IList Scenarios { get; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardListResponse.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardListResponse.Serialization.cs new file mode 100644 index 000000000000..2cf36a7d6331 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardListResponse.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.Grafana.Models +{ + internal partial class ManagedDashboardListResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(ManagedDashboardListResponse)} 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManagedDashboardListResponse 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(ManagedDashboardListResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedDashboardListResponse(document.RootElement, options); + } + + internal static ManagedDashboardListResponse DeserializeManagedDashboardListResponse(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(ManagedDashboardData.DeserializeManagedDashboardData(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 ManagedDashboardListResponse(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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(ManagedDashboardListResponse)} does not support writing '{options.Format}' format."); + } + } + + ManagedDashboardListResponse 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagedDashboardListResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedDashboardListResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardListResponse.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardListResponse.cs new file mode 100644 index 000000000000..cd94a0671d96 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardListResponse.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.Grafana.Models +{ + /// Paged collection of ManagedDashboard items. + internal partial class ManagedDashboardListResponse + { + /// + /// 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 ManagedDashboard items on this page. + /// is null. + internal ManagedDashboardListResponse(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ManagedDashboard items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ManagedDashboardListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ManagedDashboardListResponse() + { + } + + /// The ManagedDashboard items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardPatch.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardPatch.Serialization.cs new file mode 100644 index 000000000000..75473a6802a6 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardPatch.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.Grafana.Models +{ + public partial class ManagedDashboardPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(ManagedDashboardPatch)} 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManagedDashboardPatch 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(ManagedDashboardPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedDashboardPatch(document.RootElement, options); + } + + internal static ManagedDashboardPatch DeserializeManagedDashboardPatch(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 ManagedDashboardPatch(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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(ManagedDashboardPatch)} does not support writing '{options.Format}' format."); + } + } + + ManagedDashboardPatch 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagedDashboardPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedDashboardPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardPatch.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardPatch.cs new file mode 100644 index 000000000000..067b3a5fe32e --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedDashboardPatch.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.Grafana.Models +{ + /// The parameters for a PATCH request to a managed dashboard resource. + public partial class ManagedDashboardPatch + { + /// + /// 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 ManagedDashboardPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The new tags of the managed dashboard resource. + /// Keeps track of any properties unknown to the library. + internal ManagedDashboardPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The new tags of the managed dashboard resource. + public IDictionary Tags { get; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaListResponse.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaListResponse.Serialization.cs index a9e34af1daf1..eb6a03a0569f 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaListResponse.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedGrafanaListResponse)} does not support writing '{format}' format."); } - if (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); } + 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 ManagedGrafanaListResponse DeserializeManagedGrafanaListResponse 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 ManagedGrafanaListResponse DeserializeManagedGrafanaListResponse } 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 ManagedGrafanaListResponse DeserializeManagedGrafanaListResponse } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedGrafanaListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedGrafanaListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaListResponse.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaListResponse.cs index f494f4067b08..8dc858955383 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaListResponse.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaListResponse.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Grafana.Models { - /// The ManagedGrafanaListResponse. + /// Paged collection of ManagedGrafana items. internal partial class ManagedGrafanaListResponse { /// @@ -46,25 +47,34 @@ internal partial class ManagedGrafanaListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedGrafanaListResponse() + /// The ManagedGrafana items on this page. + /// is null. + internal ManagedGrafanaListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// + /// The ManagedGrafana items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ManagedGrafanaListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedGrafanaListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ManagedGrafanaListResponse() + { + } + + /// The ManagedGrafana items on this page. public IReadOnlyList Value { get; } - /// Gets the next link. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaPatch.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaPatch.cs index 8408b89aa3b6..a8650c581aab 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaPatch.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaPatch.cs @@ -69,7 +69,7 @@ internal ManagedGrafanaPatch(ManagedGrafanaSku sku, ManagedServiceIdentity ident /// Gets or sets the sku. internal ManagedGrafanaSku Sku { get; set; } - /// Gets or sets the sku name. + /// The name of the SKU. public string SkuName { get => Sku is null ? default : Sku.Name; diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaPatchProperties.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaPatchProperties.cs index 5b0c8d5d4c98..9c372741beea 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaPatchProperties.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaPatchProperties.cs @@ -100,22 +100,7 @@ public IList MonitorWorkspaceIntegrations /// Enterprise settings of a Grafana instance. public EnterpriseConfigurations EnterpriseConfigurations { get; set; } /// Server configurations of a Grafana instance. - internal GrafanaConfigurations GrafanaConfigurations { get; set; } - /// - /// Email server settings. - /// https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp - /// - public Smtp GrafanaConfigurationsSmtp - { - get => GrafanaConfigurations is null ? default : GrafanaConfigurations.Smtp; - set - { - if (GrafanaConfigurations is null) - GrafanaConfigurations = new GrafanaConfigurations(); - GrafanaConfigurations.Smtp = value; - } - } - + public GrafanaConfigurations GrafanaConfigurations { get; set; } /// Update of Grafana plugin. Key is plugin id, value is plugin definition. If plugin definition is null, plugin with given plugin id will be removed. Otherwise, given plugin will be installed. public IDictionary GrafanaPlugins { get; } /// The major Grafana software version to target. diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaProperties.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaProperties.cs index 16e7e2a89ef7..835932233838 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaProperties.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaProperties.cs @@ -126,22 +126,7 @@ public IList MonitorWorkspaceIntegrations /// Enterprise settings of a Grafana instance. public EnterpriseConfigurations EnterpriseConfigurations { get; set; } /// Server configurations of a Grafana instance. - internal GrafanaConfigurations GrafanaConfigurations { get; set; } - /// - /// Email server settings. - /// https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp - /// - public Smtp GrafanaConfigurationsSmtp - { - get => GrafanaConfigurations is null ? default : GrafanaConfigurations.Smtp; - set - { - if (GrafanaConfigurations is null) - GrafanaConfigurations = new GrafanaConfigurations(); - GrafanaConfigurations.Smtp = value; - } - } - + public GrafanaConfigurations GrafanaConfigurations { get; set; } /// Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition. public IDictionary GrafanaPlugins { get; } /// The major Grafana software version to target. diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaSku.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaSku.cs index c18b7463730c..68cad0f9ab48 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaSku.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedGrafanaSku.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Grafana.Models { - /// The ManagedGrafanaSku. + /// Represents the SKU of a resource. internal partial class ManagedGrafanaSku { /// @@ -46,7 +46,7 @@ internal partial class ManagedGrafanaSku private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The name of the SKU. /// is null. public ManagedGrafanaSku(string name) { @@ -56,7 +56,7 @@ public ManagedGrafanaSku(string name) } /// Initializes a new instance of . - /// + /// The name of the SKU. /// Keeps track of any properties unknown to the library. internal ManagedGrafanaSku(string name, IDictionary serializedAdditionalRawData) { @@ -69,7 +69,7 @@ internal ManagedGrafanaSku() { } - /// Gets or sets the name. + /// The name of the SKU. public string Name { get; set; } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedPrivateEndpointModelListResponse.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedPrivateEndpointModelListResponse.Serialization.cs index 13522ebca273..fd79aa7f4369 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedPrivateEndpointModelListResponse.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedPrivateEndpointModelListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedPrivateEndpointModelListResponse)} does not support writing '{format}' format."); } - if (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); } + 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 ManagedPrivateEndpointModelListResponse DeserializeManagedPrivat 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 ManagedPrivateEndpointModelListResponse DeserializeManagedPrivat } 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 ManagedPrivateEndpointModelListResponse DeserializeManagedPrivat } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedPrivateEndpointModelListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedPrivateEndpointModelListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedPrivateEndpointModelListResponse.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedPrivateEndpointModelListResponse.cs index 737bfcde0032..6e220c96362b 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedPrivateEndpointModelListResponse.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/ManagedPrivateEndpointModelListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Grafana.Models { @@ -46,25 +47,34 @@ internal partial class ManagedPrivateEndpointModelListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedPrivateEndpointModelListResponse() + /// The ManagedPrivateEndpointModel items on this page. + /// is null. + internal ManagedPrivateEndpointModelListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// + /// The ManagedPrivateEndpointModel items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ManagedPrivateEndpointModelListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedPrivateEndpointModelListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ManagedPrivateEndpointModelListResponse() + { + } + + /// The ManagedPrivateEndpointModel items on this page. public IReadOnlyList Value { get; } - /// Gets the next link. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/UnifiedAlertingScreenshots.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/UnifiedAlertingScreenshots.Serialization.cs new file mode 100644 index 000000000000..def01c626b87 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/UnifiedAlertingScreenshots.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.Grafana.Models +{ + internal partial class UnifiedAlertingScreenshots : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(UnifiedAlertingScreenshots)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsCaptureEnabled)) + { + writer.WritePropertyName("captureEnabled"u8); + writer.WriteBooleanValue(IsCaptureEnabled.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UnifiedAlertingScreenshots 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(UnifiedAlertingScreenshots)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUnifiedAlertingScreenshots(document.RootElement, options); + } + + internal static UnifiedAlertingScreenshots DeserializeUnifiedAlertingScreenshots(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? captureEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("captureEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + captureEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnifiedAlertingScreenshots(captureEnabled, 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, AzureResourceManagerGrafanaContext.Default); + default: + throw new FormatException($"The model {nameof(UnifiedAlertingScreenshots)} does not support writing '{options.Format}' format."); + } + } + + UnifiedAlertingScreenshots 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnifiedAlertingScreenshots(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UnifiedAlertingScreenshots)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/UnifiedAlertingScreenshots.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/UnifiedAlertingScreenshots.cs new file mode 100644 index 000000000000..f722b11437d5 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Models/UnifiedAlertingScreenshots.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.Grafana.Models +{ + /// Grafana Unified Alerting Screenshots settings. + internal partial class UnifiedAlertingScreenshots + { + /// + /// 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 UnifiedAlertingScreenshots() + { + } + + /// Initializes a new instance of . + /// Set to false to disable capture screenshot in Unified Alert due to performance issue. + /// Keeps track of any properties unknown to the library. + internal UnifiedAlertingScreenshots(bool? isCaptureEnabled, IDictionary serializedAdditionalRawData) + { + IsCaptureEnabled = isCaptureEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Set to false to disable capture screenshot in Unified Alert due to performance issue. + public bool? IsCaptureEnabled { get; set; } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/IntegrationFabricsRestOperations.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/IntegrationFabricsRestOperations.cs new file mode 100644 index 000000000000..aa76db26ef19 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/IntegrationFabricsRestOperations.cs @@ -0,0 +1,613 @@ +// 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.Grafana.Models; + +namespace Azure.ResourceManager.Grafana +{ + internal partial class IntegrationFabricsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of IntegrationFabricsRestOperations. + /// 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 IntegrationFabricsRestOperations(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-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics/", false); + uri.AppendPath(integrationFabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics/", false); + uri.AppendPath(integrationFabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a IntegrationFabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The integration fabric name of Azure Managed Grafana. + /// 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 workspaceName, string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, integrationFabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GrafanaIntegrationFabricData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GrafanaIntegrationFabricData.DeserializeGrafanaIntegrationFabricData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GrafanaIntegrationFabricData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a IntegrationFabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The integration fabric name of Azure Managed Grafana. + /// 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 workspaceName, string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, integrationFabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GrafanaIntegrationFabricData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GrafanaIntegrationFabricData.DeserializeGrafanaIntegrationFabricData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GrafanaIntegrationFabricData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName, GrafanaIntegrationFabricData 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics/", false); + uri.AppendPath(integrationFabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName, GrafanaIntegrationFabricData 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics/", false); + uri.AppendPath(integrationFabricName, 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 IntegrationFabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The integration fabric name of Azure Managed Grafana. + /// The to use. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName, GrafanaIntegrationFabricData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, integrationFabricName, 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 IntegrationFabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The integration fabric name of Azure Managed Grafana. + /// The to use. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName, GrafanaIntegrationFabricData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, integrationFabricName, 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 subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName, GrafanaIntegrationFabricPatch 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics/", false); + uri.AppendPath(integrationFabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName, GrafanaIntegrationFabricPatch patch) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics/", false); + uri.AppendPath(integrationFabricName, 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 IntegrationFabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The integration fabric name of Azure Managed Grafana. + /// The to use. + /// 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 workspaceName, string integrationFabricName, GrafanaIntegrationFabricPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, integrationFabricName, 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 IntegrationFabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The integration fabric name of Azure Managed Grafana. + /// The to use. + /// 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 workspaceName, string integrationFabricName, GrafanaIntegrationFabricPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, integrationFabricName, 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 subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics/", false); + uri.AppendPath(integrationFabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string integrationFabricName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics/", false); + uri.AppendPath(integrationFabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a IntegrationFabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The integration fabric name of Azure Managed Grafana. + /// 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 workspaceName, string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, integrationFabricName); + 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 IntegrationFabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The integration fabric name of Azure Managed Grafana. + /// 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 workspaceName, string integrationFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(integrationFabricName, nameof(integrationFabricName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, integrationFabricName); + _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 workspaceName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/integrationFabrics", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List IntegrationFabric resources by ManagedGrafana. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// 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 workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + IntegrationFabricListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = IntegrationFabricListResponse.DeserializeIntegrationFabricListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List IntegrationFabric resources by ManagedGrafana. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// 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 workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + IntegrationFabricListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = IntegrationFabricListResponse.DeserializeIntegrationFabricListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName) + { + 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 IntegrationFabric resources by ManagedGrafana. + /// 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 workspace name of Azure Managed Grafana. + /// 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 workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + IntegrationFabricListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = IntegrationFabricListResponse.DeserializeIntegrationFabricListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List IntegrationFabric resources by ManagedGrafana. + /// 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 workspace name of Azure Managed Grafana. + /// 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 workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + IntegrationFabricListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = IntegrationFabricListResponse.DeserializeIntegrationFabricListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedDashboardsRestOperations.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedDashboardsRestOperations.cs new file mode 100644 index 000000000000..b05c8d46445d --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedDashboardsRestOperations.cs @@ -0,0 +1,731 @@ +// 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.Grafana.Models; + +namespace Azure.ResourceManager.Grafana +{ + internal partial class ManagedDashboardsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ManagedDashboardsRestOperations. + /// 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 ManagedDashboardsRestOperations(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-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string dashboardName) + { + 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.Dashboard/dashboards/", false); + uri.AppendPath(dashboardName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string dashboardName) + { + 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.Dashboard/dashboards/", false); + uri.AppendPath(dashboardName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the properties of a specific dashboard for grafana resource. + /// 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 Azure Managed Dashboard. + /// 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 dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dashboardName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedDashboardData.DeserializeManagedDashboardData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ManagedDashboardData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the properties of a specific dashboard for grafana resource. + /// 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 Azure Managed Dashboard. + /// 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 dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, dashboardName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedDashboardData.DeserializeManagedDashboardData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ManagedDashboardData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string dashboardName, ManagedDashboardData 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.Dashboard/dashboards/", false); + uri.AppendPath(dashboardName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string dashboardName, ManagedDashboardData 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.Dashboard/dashboards/", false); + uri.AppendPath(dashboardName, 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 dashboard for grafana resource. This API is idempotent, so user can either create a new dashboard or update an existing dashboard. + /// 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 Azure Managed Dashboard. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string dashboardName, ManagedDashboardData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, dashboardName, 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 or update a dashboard for grafana resource. This API is idempotent, so user can either create a new dashboard or update an existing dashboard. + /// 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 Azure Managed Dashboard. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string dashboardName, ManagedDashboardData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, dashboardName, 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 subscriptionId, string resourceGroupName, string dashboardName, ManagedDashboardPatch 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.Dashboard/dashboards/", false); + uri.AppendPath(dashboardName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string dashboardName, ManagedDashboardPatch patch) + { + 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.Dashboard/dashboards/", false); + uri.AppendPath(dashboardName, 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 dashboard for Grafana resource. + /// 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 Azure Managed Dashboard. + /// The to use. + /// 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 dashboardName, ManagedDashboardPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dashboardName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedDashboardData.DeserializeManagedDashboardData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a dashboard for Grafana resource. + /// 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 Azure Managed Dashboard. + /// The to use. + /// 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 dashboardName, ManagedDashboardPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dashboardName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedDashboardData.DeserializeManagedDashboardData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string dashboardName) + { + 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.Dashboard/dashboards/", false); + uri.AppendPath(dashboardName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string dashboardName) + { + 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.Dashboard/dashboards/", false); + uri.AppendPath(dashboardName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a dashboard for Grafana resource. + /// 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 Azure Managed Dashboard. + /// 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 dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dashboardName); + 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 dashboard for Grafana resource. + /// 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 Azure Managed Dashboard. + /// 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 dashboardName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dashboardName); + _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 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.Dashboard/dashboards", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) + { + 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.Dashboard/dashboards", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all resources of dashboards under the specified 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. + /// 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 = CreateListRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedDashboardListResponse.DeserializeManagedDashboardListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all resources of dashboards under the specified 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. + /// 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 = CreateListRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedDashboardListResponse.DeserializeManagedDashboardListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Dashboard/dashboards", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + 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.Dashboard/dashboards", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all resources of dashboards under the specified subscription. + /// The ID of the target subscription. The value must be an UUID. + /// 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) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedDashboardListResponse.DeserializeManagedDashboardListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all resources of dashboards under the specified subscription. + /// The ID of the target subscription. The value must be an UUID. + /// 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) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedDashboardListResponse.DeserializeManagedDashboardListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + 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 all resources of dashboards under the specified 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 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) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedDashboardListResponse.DeserializeManagedDashboardListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all resources of dashboards under the specified 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 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) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedDashboardListResponse.DeserializeManagedDashboardListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + 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 all resources of dashboards under the specified subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedDashboardListResponse.DeserializeManagedDashboardListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all resources of dashboards under the specified subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedDashboardListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedDashboardListResponse.DeserializeManagedDashboardListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/GrafanaRestOperations.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedGrafanasRestOperations.cs similarity index 88% rename from sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/GrafanaRestOperations.cs rename to sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedGrafanasRestOperations.cs index 278d6a942b7e..e678359a5080 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/GrafanaRestOperations.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedGrafanasRestOperations.cs @@ -15,39 +15,42 @@ namespace Azure.ResourceManager.Grafana { - internal partial class GrafanaRestOperations + internal partial class ManagedGrafanasRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of GrafanaRestOperations. + /// Initializes a new instance of ManagedGrafanasRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. - public GrafanaRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public ManagedGrafanasRestOperations(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"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Dashboard/grafana", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -56,7 +59,10 @@ internal HttpMessage CreateListRequest(string subscriptionId) uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Dashboard/grafana", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -64,57 +70,69 @@ internal HttpMessage CreateListRequest(string subscriptionId) return message; } - /// List all resources of workspaces for Grafana under the specified subscription. - /// The ID of the target subscription. + /// Get the properties of a specific workspace for Grafana resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, 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 workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedGrafanaListResponse value = default; + ManagedGrafanaData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedGrafanaListResponse.DeserializeManagedGrafanaListResponse(document.RootElement); + value = ManagedGrafanaData.DeserializeManagedGrafanaData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ManagedGrafanaData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all resources of workspaces for Grafana under the specified subscription. - /// The ID of the target subscription. + /// Get the properties of a specific workspace for Grafana resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, 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 workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedGrafanaListResponse value = default; + ManagedGrafanaData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedGrafanaListResponse.DeserializeManagedGrafanaListResponse(document.RootElement); + value = ManagedGrafanaData.DeserializeManagedGrafanaData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ManagedGrafanaData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -122,85 +140,91 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Dashboard/grafana", false); + uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaData 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); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Dashboard/grafana", false); + uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, 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 all resources of workspaces for Grafana under the specified resource group. - /// The ID of the target subscription. + /// Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The to use. /// 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ManagedGrafanaListResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedGrafanaListResponse.DeserializeManagedGrafanaListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List all resources of workspaces for Grafana under the specified resource group. - /// The ID of the target subscription. + /// Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The to use. /// 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ManagedGrafanaListResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedGrafanaListResponse.DeserializeManagedGrafanaListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -214,11 +238,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaPatch patch) { 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); @@ -230,73 +254,79 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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; } - /// Get the properties of a specific workspace for Grafana resource. - /// The ID of the target subscription. + /// Update a workspace for Grafana resource. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: + case 202: { ManagedGrafanaData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); value = ManagedGrafanaData.DeserializeManagedGrafanaData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ManagedGrafanaData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get the properties of a specific workspace for Grafana resource. - /// The ID of the target subscription. + /// Update a workspace for Grafana resource. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: + case 202: { ManagedGrafanaData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); value = ManagedGrafanaData.DeserializeManagedGrafanaData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ManagedGrafanaData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaData data) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -310,11 +340,11 @@ internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName) { 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); @@ -326,69 +356,63 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG 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 workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. - /// The ID of the target subscription. + /// Delete a workspace for Grafana resource. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. - /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaData data, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName); 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 or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. - /// The ID of the target subscription. + /// Delete a workspace for Grafana resource. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. - /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaData data, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName); _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 CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaPatch patch) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -396,61 +420,50 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); - uri.AppendPath(workspaceName, true); + uri.AppendPath("/providers/Microsoft.Dashboard/grafana", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, ManagedGrafanaPatch patch) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { 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); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); - uri.AppendPath(workspaceName, true); + uri.AppendPath("/providers/Microsoft.Dashboard/grafana", 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Update a workspace for Grafana resource. - /// The ID of the target subscription. + /// List all resources of workspaces for Grafana under the specified 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 workspace name of Azure Managed Grafana. - /// The to use. /// 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 workspaceName, ManagedGrafanaPatch patch, CancellationToken cancellationToken = default) + /// 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) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, patch); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: { - ManagedGrafanaData value = default; + ManagedGrafanaListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedGrafanaData.DeserializeManagedGrafanaData(document.RootElement); + value = ManagedGrafanaListResponse.DeserializeManagedGrafanaListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -458,31 +471,26 @@ public async Task> UpdateAsync(string subscriptionI } } - /// Update a workspace for Grafana resource. - /// The ID of the target subscription. + /// List all resources of workspaces for Grafana under the specified 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 workspace name of Azure Managed Grafana. - /// The to use. /// 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 workspaceName, ManagedGrafanaPatch patch, CancellationToken cancellationToken = default) + /// 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) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, patch); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: { - ManagedGrafanaData value = default; + ManagedGrafanaListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedGrafanaData.DeserializeManagedGrafanaData(document.RootElement); + value = ManagedGrafanaListResponse.DeserializeManagedGrafanaListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -490,33 +498,27 @@ public Response Update(string subscriptionId, string resourc } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + internal RequestUriBuilder CreateListRequestUri(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.Dashboard/grafana/", false); - uri.AppendPath(workspaceName, true); + uri.AppendPath("/providers/Microsoft.Dashboard/grafana", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListRequest(string subscriptionId) { 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.Dashboard/grafana/", false); - uri.AppendPath(workspaceName, true); + uri.AppendPath("/providers/Microsoft.Dashboard/grafana", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -524,53 +526,51 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a workspace for Grafana resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The workspace name of Azure Managed Grafana. + /// List all resources of workspaces for Grafana under the specified subscription. + /// 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 DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + ManagedGrafanaListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedGrafanaListResponse.DeserializeManagedGrafanaListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete a workspace for Grafana resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The workspace name of Azure Managed Grafana. + /// List all resources of workspaces for Grafana under the specified subscription. + /// 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 Delete(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + ManagedGrafanaListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedGrafanaListResponse.DeserializeManagedGrafanaListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -613,7 +613,7 @@ internal HttpMessage CreateCheckEnterpriseDetailsRequest(string subscriptionId, } /// Retrieve enterprise add-on details information. - /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -642,7 +642,7 @@ public async Task> CheckEnterpriseDetailsAsync(strin } /// Retrieve enterprise add-on details information. - /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -706,7 +706,8 @@ internal HttpMessage CreateFetchAvailablePluginsRequest(string subscriptionId, s return message; } - /// The ID of the target subscription. + /// A synchronous resource action. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -734,7 +735,8 @@ public async Task> FetchAvailablePl } } - /// The ID of the target subscription. + /// A synchronous resource action. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -762,7 +764,93 @@ public Response FetchAvailablePlugins(string } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateRefreshManagedPrivateEndpointRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/refreshManagedPrivateEndpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRefreshManagedPrivateEndpointRequest(string subscriptionId, string resourceGroupName, string workspaceName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/refreshManagedPrivateEndpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Refresh and sync managed private endpoints of a grafana resource to latest state. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RefreshManagedPrivateEndpointAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateRefreshManagedPrivateEndpointRequest(subscriptionId, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Refresh and sync managed private endpoints of a grafana resource to latest state. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RefreshManagedPrivateEndpoint(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateRefreshManagedPrivateEndpointRequest(subscriptionId, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -770,7 +858,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -784,18 +872,20 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List all resources of workspaces for Grafana under the specified subscription. + /// List all resources of workspaces for Grafana under the specified 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> ListNextPageAsync(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> ListByResourceGroupNextPageAsync(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 = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -811,18 +901,20 @@ public async Task> ListNextPageAsync(string } } - /// List all resources of workspaces for Grafana under the specified subscription. + /// List all resources of workspaces for Grafana under the specified 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 ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , 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) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -838,7 +930,7 @@ public Response ListNextPage(string nextLink, string } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -846,7 +938,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -860,20 +952,18 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// List all resources of workspaces for Grafana under the specified resource group. + /// List all resources of workspaces for Grafana under the specified subscription. /// 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> ListByResourceGroupNextPageAsync(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> ListNextPageAsync(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -889,20 +979,18 @@ public async Task> ListByResourceGroupNextP } } - /// List all resources of workspaces for Grafana under the specified resource group. + /// List all resources of workspaces for Grafana under the specified subscription. /// 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 ListByResourceGroupNextPage(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 ListNextPage(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedPrivateEndpointModelsRestOperations.cs similarity index 87% rename from sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs rename to sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedPrivateEndpointModelsRestOperations.cs index f683466ad111..6d2c0ceb6dab 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/ManagedPrivateEndpointModelsRestOperations.cs @@ -15,207 +15,27 @@ namespace Azure.ResourceManager.Grafana { - internal partial class ManagedPrivateEndpointsRestOperations + internal partial class ManagedPrivateEndpointModelsRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of ManagedPrivateEndpointsRestOperations. + /// Initializes a new instance of ManagedPrivateEndpointModelsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. - public ManagedPrivateEndpointsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public ManagedPrivateEndpointModelsRestOperations(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"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) - { - 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.Dashboard/grafana/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/managedPrivateEndpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName) - { - 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.Dashboard/grafana/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/managedPrivateEndpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all managed private endpoints of a grafana resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The workspace name of Azure Managed Grafana. - /// 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 workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ManagedPrivateEndpointModelListResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedPrivateEndpointModelListResponse.DeserializeManagedPrivateEndpointModelListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all managed private endpoints of a grafana resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The workspace name of Azure Managed Grafana. - /// 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 workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ManagedPrivateEndpointModelListResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedPrivateEndpointModelListResponse.DeserializeManagedPrivateEndpointModelListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateRefreshRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) - { - 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.Dashboard/grafana/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/refreshManagedPrivateEndpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateRefreshRequest(string subscriptionId, string resourceGroupName, string workspaceName) - { - 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.Dashboard/grafana/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/refreshManagedPrivateEndpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Refresh and sync managed private endpoints of a grafana resource to latest state. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The workspace name of Azure Managed Grafana. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task RefreshAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateRefreshRequest(subscriptionId, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Refresh and sync managed private endpoints of a grafana resource to latest state. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The workspace name of Azure Managed Grafana. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Refresh(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateRefreshRequest(subscriptionId, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string managedPrivateEndpointName) { var uri = new RawRequestUriBuilder(); @@ -255,7 +75,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a specific managed private endpoint of a grafana 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. /// The workspace name of Azure Managed Grafana. /// The managed private endpoint name of Azure Managed Grafana. @@ -288,7 +108,7 @@ public async Task> GetAsync(string sub } /// Get a specific managed private endpoint of a grafana 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. /// The workspace name of Azure Managed Grafana. /// The managed private endpoint name of Azure Managed Grafana. @@ -363,7 +183,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Create or update a managed private endpoint for a grafana 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. /// The workspace name of Azure Managed Grafana. /// The managed private endpoint name of Azure Managed Grafana. @@ -392,7 +212,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Create or update a managed private endpoint for a grafana 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. /// The workspace name of Azure Managed Grafana. /// The managed private endpoint name of Azure Managed Grafana. @@ -463,7 +283,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update a managed private endpoint for an existing grafana 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. /// The workspace name of Azure Managed Grafana. /// The managed private endpoint name of Azure Managed Grafana. @@ -492,7 +312,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update a managed private endpoint for an existing grafana 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. /// The workspace name of Azure Managed Grafana. /// The managed private endpoint name of Azure Managed Grafana. @@ -559,7 +379,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a managed private endpoint for a grafana 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. /// The workspace name of Azure Managed Grafana. /// The managed private endpoint name of Azure Managed Grafana. @@ -587,7 +407,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a managed private endpoint for a grafana 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. /// The workspace name of Azure Managed Grafana. /// The managed private endpoint name of Azure Managed Grafana. @@ -614,6 +434,100 @@ public Response Delete(string subscriptionId, string resourceGroupName, string w } } + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/managedPrivateEndpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName) + { + 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.Dashboard/grafana/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/managedPrivateEndpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all managed private endpoints of a grafana resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// 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 workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedPrivateEndpointModelListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedPrivateEndpointModelListResponse.DeserializeManagedPrivateEndpointModelListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all managed private endpoints of a grafana resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The workspace name of Azure Managed Grafana. + /// 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 workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedPrivateEndpointModelListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedPrivateEndpointModelListResponse.DeserializeManagedPrivateEndpointModelListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); @@ -638,7 +552,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List all managed private endpoints of a grafana resource. /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -669,7 +583,7 @@ public async Task> ListNextPag /// List all managed private endpoints of a grafana resource. /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 292982f1035a..03b6e1f380b1 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -25,14 +25,14 @@ 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. - /// server parameter. - /// Api Version. + /// 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) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get private endpoint connections. - /// 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 workspace name of Azure Managed Grafana. /// The private endpoint connection name of Azure Managed Grafana. @@ -108,7 +108,7 @@ public async Task> GetAsync(strin } /// Get private endpoint connections. - /// 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 workspace name of Azure Managed Grafana. /// The private endpoint connection name of Azure Managed Grafana. @@ -183,7 +183,7 @@ internal HttpMessage CreateApproveRequest(string subscriptionId, string resource } /// Manual approve private endpoint connection. - /// 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 workspace name of Azure Managed Grafana. /// The private endpoint connection name of Azure Managed Grafana. @@ -211,7 +211,7 @@ public async Task ApproveAsync(string subscriptionId, string resourceG } /// Manual approve private endpoint connection. - /// 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 workspace name of Azure Managed Grafana. /// The private endpoint connection name of Azure Managed Grafana. @@ -277,7 +277,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete private endpoint connection. - /// 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 workspace name of Azure Managed Grafana. /// The private endpoint connection name of Azure Managed Grafana. @@ -304,7 +304,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete private endpoint connection. - /// 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 workspace name of Azure Managed Grafana. /// The private endpoint connection name of Azure Managed Grafana. @@ -367,7 +367,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get private endpoint connection. - /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -396,7 +396,7 @@ public async Task> ListAsyn } /// Get private endpoint connection. - /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -448,7 +448,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get private endpoint connection. /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -479,7 +479,7 @@ public async Task> ListNext /// Get private endpoint connection. /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 404b4d587ac0..ce0d6b1d2b9d 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class PrivateLinkResourcesRestOperations /// Initializes a new instance of PrivateLinkResourcesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public PrivateLinkResourcesRestOperations(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"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string privateLinkResourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(privateLinkResourceName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateLinkResourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(privateLinkResourceName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List all private link resources information for this grafana resource. - /// The ID of the target subscription. + /// Get specific private link resource information for this grafana resource. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. + /// The to use. /// 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 workspaceName, 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 workspaceName, string privateLinkResourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateLinkResourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - GrafanaPrivateLinkResourceListResult value = default; + GrafanaPrivateLinkResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = GrafanaPrivateLinkResourceListResult.DeserializeGrafanaPrivateLinkResourceListResult(document.RootElement); + value = GrafanaPrivateLinkResourceData.DeserializeGrafanaPrivateLinkResourceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((GrafanaPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all private link resources information for this grafana resource. - /// The ID of the target subscription. + /// Get specific private link resource information for this grafana resource. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. + /// The to use. /// 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 workspaceName, 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 workspaceName, string privateLinkResourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateLinkResourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - GrafanaPrivateLinkResourceListResult value = default; + GrafanaPrivateLinkResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = GrafanaPrivateLinkResourceListResult.DeserializeGrafanaPrivateLinkResourceListResult(document.RootElement); + value = GrafanaPrivateLinkResourceData.DeserializeGrafanaPrivateLinkResourceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((GrafanaPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string privateLinkResourceName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -140,13 +150,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(privateLinkResourceName, true); + uri.AppendPath("/privateLinkResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateLinkResourceName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -159,8 +168,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Dashboard/grafana/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(privateLinkResourceName, true); + uri.AppendPath("/privateLinkResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -168,67 +176,59 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get specific private link resource information for this grafana resource. - /// The ID of the target subscription. + /// List all private link resources information for this grafana resource. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. - /// The to use. /// 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 workspaceName, string privateLinkResourceName, 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, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateLinkResourceName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - GrafanaPrivateLinkResourceData value = default; + GrafanaPrivateLinkResourceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = GrafanaPrivateLinkResourceData.DeserializeGrafanaPrivateLinkResourceData(document.RootElement); + value = GrafanaPrivateLinkResourceListResult.DeserializeGrafanaPrivateLinkResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((GrafanaPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get specific private link resource information for this grafana resource. - /// The ID of the target subscription. + /// List all private link resources information for this grafana resource. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The workspace name of Azure Managed Grafana. - /// The to use. /// 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 workspaceName, string privateLinkResourceName, 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, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateLinkResourceName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - GrafanaPrivateLinkResourceData value = default; + GrafanaPrivateLinkResourceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = GrafanaPrivateLinkResourceData.DeserializeGrafanaPrivateLinkResourceData(document.RootElement); + value = GrafanaPrivateLinkResourceListResult.DeserializeGrafanaPrivateLinkResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((GrafanaPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -258,7 +258,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List all private link resources information for this grafana resource. /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. @@ -289,7 +289,7 @@ public async Task> ListNextPageAs /// List all private link resources information for this grafana resource. /// 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 workspace name of Azure Managed Grafana. /// The cancellation token to use. diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Properties/AssemblyInfo.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Properties/AssemblyInfo.cs index 2703ead25e7b..c47881682fba 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Properties/AssemblyInfo.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Properties/AssemblyInfo.cs @@ -5,6 +5,5 @@ [assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Dashboard")] -[assembly: InternalsVisibleTo("Azure.ResourceManager.Grafana.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] - [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.Grafana.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/autorest.md b/sdk/grafana/Azure.ResourceManager.Grafana/src/autorest.md deleted file mode 100644 index fa87ca283780..000000000000 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/autorest.md +++ /dev/null @@ -1,66 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: Grafana -namespace: Azure.ResourceManager.Grafana -require: https://github.com/Azure/azure-rest-api-specs/blob/0235efbc79f71f77932a7df73fbda71351524f9a/specification/dashboard/resource-manager/readme.md -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../tests/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -rename-mapping: - AzureMonitorWorkspaceIntegration: MonitorWorkspaceIntegration - AzureMonitorWorkspaceIntegration.azureMonitorWorkspaceResourceId: MonitorWorkspaceResourceId|arm-id - GrafanaIntegrations.azureMonitorWorkspaceIntegrations: MonitorWorkspaceIntegrations - ManagedGrafanaPropertiesUpdateParameters: ManagedGrafanaPatchProperties - - ResourceSku: ManagedGrafanaSku - -prepend-rp-prefix: - - ApiKey - - PublicNetworkAccess - - ProvisioningState - - ZoneRedundancy - -format-by-name-rules: - 'etag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - 'privateLinkResourceId': 'arm-id' - -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/grafana/Azure.ResourceManager.Grafana/tests/Azure.ResourceManager.Grafana.Tests.csproj b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Azure.ResourceManager.Grafana.Tests.csproj index 218fd354742c..250878f84d09 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Azure.ResourceManager.Grafana.Tests.csproj +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Azure.ResourceManager.Grafana.Tests.csproj @@ -2,12 +2,4 @@ - - - - - - - - diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaIntegrationFabricCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaIntegrationFabricCollection.cs new file mode 100644 index 000000000000..ea2c5e53bb94 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaIntegrationFabricCollection.cs @@ -0,0 +1,205 @@ +// 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.Grafana.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Grafana.Samples +{ + public partial class Sample_GrafanaIntegrationFabricCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_IntegrationFabricsCreate() + { + // Generated from example definition: 2024-11-01-preview/IntegrationFabrics_Create.json + // this example is just showing the usage of "IntegrationFabric_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(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ManagedGrafanaResource created on azure + // for more information of creating ManagedGrafanaResource, please refer to the document of ManagedGrafanaResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "myWorkspace"; + ResourceIdentifier managedGrafanaResourceId = ManagedGrafanaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + ManagedGrafanaResource managedGrafana = client.GetManagedGrafanaResource(managedGrafanaResourceId); + + // get the collection of this GrafanaIntegrationFabricResource + GrafanaIntegrationFabricCollection collection = managedGrafana.GetGrafanaIntegrationFabrics(); + + // invoke the operation + string integrationFabricName = "sampleIntegration"; + GrafanaIntegrationFabricData data = new GrafanaIntegrationFabricData(new AzureLocation("West US")) + { + Properties = new GrafanaIntegrationFabricProperties + { + TargetResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myAks"), + DataSourceResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Monitor/accounts/myAmw"), + Scenarios = { "scenario1", "scenario2" }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, integrationFabricName, data); + GrafanaIntegrationFabricResource 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 + GrafanaIntegrationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_IntegrationFabricsGet() + { + // Generated from example definition: 2024-11-01-preview/IntegrationFabrics_Get.json + // this example is just showing the usage of "IntegrationFabric_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 ManagedGrafanaResource created on azure + // for more information of creating ManagedGrafanaResource, please refer to the document of ManagedGrafanaResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "myWorkspace"; + ResourceIdentifier managedGrafanaResourceId = ManagedGrafanaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + ManagedGrafanaResource managedGrafana = client.GetManagedGrafanaResource(managedGrafanaResourceId); + + // get the collection of this GrafanaIntegrationFabricResource + GrafanaIntegrationFabricCollection collection = managedGrafana.GetGrafanaIntegrationFabrics(); + + // invoke the operation + string integrationFabricName = "sampleIntegration"; + GrafanaIntegrationFabricResource result = await collection.GetAsync(integrationFabricName); + + // 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 + GrafanaIntegrationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_IntegrationFabricsList() + { + // Generated from example definition: 2024-11-01-preview/IntegrationFabrics_List.json + // this example is just showing the usage of "IntegrationFabric_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 ManagedGrafanaResource created on azure + // for more information of creating ManagedGrafanaResource, please refer to the document of ManagedGrafanaResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "myWorkspace"; + ResourceIdentifier managedGrafanaResourceId = ManagedGrafanaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + ManagedGrafanaResource managedGrafana = client.GetManagedGrafanaResource(managedGrafanaResourceId); + + // get the collection of this GrafanaIntegrationFabricResource + GrafanaIntegrationFabricCollection collection = managedGrafana.GetGrafanaIntegrationFabrics(); + + // invoke the operation and iterate over the result + await foreach (GrafanaIntegrationFabricResource 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 + GrafanaIntegrationFabricData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_IntegrationFabricsGet() + { + // Generated from example definition: 2024-11-01-preview/IntegrationFabrics_Get.json + // this example is just showing the usage of "IntegrationFabric_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 ManagedGrafanaResource created on azure + // for more information of creating ManagedGrafanaResource, please refer to the document of ManagedGrafanaResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "myWorkspace"; + ResourceIdentifier managedGrafanaResourceId = ManagedGrafanaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + ManagedGrafanaResource managedGrafana = client.GetManagedGrafanaResource(managedGrafanaResourceId); + + // get the collection of this GrafanaIntegrationFabricResource + GrafanaIntegrationFabricCollection collection = managedGrafana.GetGrafanaIntegrationFabrics(); + + // invoke the operation + string integrationFabricName = "sampleIntegration"; + bool result = await collection.ExistsAsync(integrationFabricName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_IntegrationFabricsGet() + { + // Generated from example definition: 2024-11-01-preview/IntegrationFabrics_Get.json + // this example is just showing the usage of "IntegrationFabric_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 ManagedGrafanaResource created on azure + // for more information of creating ManagedGrafanaResource, please refer to the document of ManagedGrafanaResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "myWorkspace"; + ResourceIdentifier managedGrafanaResourceId = ManagedGrafanaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + ManagedGrafanaResource managedGrafana = client.GetManagedGrafanaResource(managedGrafanaResourceId); + + // get the collection of this GrafanaIntegrationFabricResource + GrafanaIntegrationFabricCollection collection = managedGrafana.GetGrafanaIntegrationFabrics(); + + // invoke the operation + string integrationFabricName = "sampleIntegration"; + NullableResponse response = await collection.GetIfExistsAsync(integrationFabricName); + GrafanaIntegrationFabricResource 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 + GrafanaIntegrationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaIntegrationFabricResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaIntegrationFabricResource.cs new file mode 100644 index 000000000000..f82874fdbbf6 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaIntegrationFabricResource.cs @@ -0,0 +1,117 @@ +// 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.Grafana.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Grafana.Samples +{ + public partial class Sample_GrafanaIntegrationFabricResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_IntegrationFabricsGet() + { + // Generated from example definition: 2024-11-01-preview/IntegrationFabrics_Get.json + // this example is just showing the usage of "IntegrationFabric_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 GrafanaIntegrationFabricResource created on azure + // for more information of creating GrafanaIntegrationFabricResource, please refer to the document of GrafanaIntegrationFabricResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "myWorkspace"; + string integrationFabricName = "sampleIntegration"; + ResourceIdentifier grafanaIntegrationFabricResourceId = GrafanaIntegrationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, integrationFabricName); + GrafanaIntegrationFabricResource grafanaIntegrationFabric = client.GetGrafanaIntegrationFabricResource(grafanaIntegrationFabricResourceId); + + // invoke the operation + GrafanaIntegrationFabricResource result = await grafanaIntegrationFabric.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 + GrafanaIntegrationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_IntegrationFabricsDelete() + { + // Generated from example definition: 2024-11-01-preview/IntegrationFabrics_Delete.json + // this example is just showing the usage of "IntegrationFabric_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 GrafanaIntegrationFabricResource created on azure + // for more information of creating GrafanaIntegrationFabricResource, please refer to the document of GrafanaIntegrationFabricResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "myWorkspace"; + string integrationFabricName = "sampleIntegration"; + ResourceIdentifier grafanaIntegrationFabricResourceId = GrafanaIntegrationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, integrationFabricName); + GrafanaIntegrationFabricResource grafanaIntegrationFabric = client.GetGrafanaIntegrationFabricResource(grafanaIntegrationFabricResourceId); + + // invoke the operation + await grafanaIntegrationFabric.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_IntegrationFabricsUpdate() + { + // Generated from example definition: 2024-11-01-preview/IntegrationFabrics_Update.json + // this example is just showing the usage of "IntegrationFabric_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 GrafanaIntegrationFabricResource created on azure + // for more information of creating GrafanaIntegrationFabricResource, please refer to the document of GrafanaIntegrationFabricResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "myWorkspace"; + string integrationFabricName = "sampleIntegration"; + ResourceIdentifier grafanaIntegrationFabricResourceId = GrafanaIntegrationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, integrationFabricName); + GrafanaIntegrationFabricResource grafanaIntegrationFabric = client.GetGrafanaIntegrationFabricResource(grafanaIntegrationFabricResourceId); + + // invoke the operation + GrafanaIntegrationFabricPatch patch = new GrafanaIntegrationFabricPatch + { + Tags = +{ +["Environment"] = "Dev 2" +}, + IntegrationFabricPropertiesUpdateParametersScenarios = { "scenario1" }, + }; + ArmOperation lro = await grafanaIntegrationFabric.UpdateAsync(WaitUntil.Completed, patch); + GrafanaIntegrationFabricResource 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 + GrafanaIntegrationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateEndpointConnectionCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateEndpointConnectionCollection.cs index 2ad53dc6d5e5..cb36d1471fff 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateEndpointConnectionCollection.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateEndpointConnectionCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_GrafanaPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionsApprove() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Approve.json - // this example is just showing the usage of "PrivateEndpointConnections_Approve" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateEndpointConnections_Approve.json + // this example is just showing the usage of "PrivateEndpointConnection_Approve" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_PrivateEndpointConnectionsApprove() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Get.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateEndpointConnections_Get.json + // this example is just showing the usage of "PrivateEndpointConnection_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(); @@ -89,8 +89,8 @@ public async Task Get_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionsList() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_List.json - // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateEndpointConnections_List.json + // this example is just showing the usage of "PrivateEndpointConnection_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(); @@ -125,8 +125,8 @@ public async Task GetAll_PrivateEndpointConnectionsList() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Get.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateEndpointConnections_Get.json + // this example is just showing the usage of "PrivateEndpointConnection_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(); @@ -155,8 +155,8 @@ public async Task Exists_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Get.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateEndpointConnections_Get.json + // this example is just showing the usage of "PrivateEndpointConnection_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(); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateEndpointConnectionResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateEndpointConnectionResource.cs index 2bdd07dc0fbc..c4cad8b38840 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateEndpointConnectionResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateEndpointConnectionResource.cs @@ -19,8 +19,8 @@ public partial class Sample_GrafanaPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Get.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateEndpointConnections_Get.json + // this example is just showing the usage of "PrivateEndpointConnection_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(); @@ -50,8 +50,8 @@ public async Task Get_PrivateEndpointConnectionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionsDelete() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Delete.json - // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateEndpointConnections_Delete.json + // this example is just showing the usage of "PrivateEndpointConnection_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(); @@ -77,8 +77,8 @@ public async Task Delete_PrivateEndpointConnectionsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionsApprove() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateEndpointConnections_Approve.json - // this example is just showing the usage of "PrivateEndpointConnections_Approve" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateEndpointConnections_Approve.json + // this example is just showing the usage of "PrivateEndpointConnection_Approve" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateLinkResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateLinkResource.cs index 09c41ce410ec..00fc5a811ace 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateLinkResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateLinkResource.cs @@ -19,8 +19,8 @@ public partial class Sample_GrafanaPrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateLinkResourcesGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateLinkResources_Get.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateLinkResources_Get.json + // this example is just showing the usage of "PrivateLinkResource_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(); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateLinkResourceCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateLinkResourceCollection.cs index dc905c43f375..719ba8368648 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateLinkResourceCollection.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_GrafanaPrivateLinkResourceCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_GrafanaPrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_PrivateLinkResourcesGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateLinkResources_Get.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateLinkResources_Get.json + // this example is just showing the usage of "PrivateLinkResource_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,8 +53,8 @@ public async Task Get_PrivateLinkResourcesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateLinkResourcesList() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateLinkResources_List.json - // this example is just showing the usage of "PrivateLinkResources_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateLinkResources_List.json + // this example is just showing the usage of "PrivateLinkResource_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(); @@ -89,8 +89,8 @@ public async Task GetAll_PrivateLinkResourcesList() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateLinkResourcesGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateLinkResources_Get.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateLinkResources_Get.json + // this example is just showing the usage of "PrivateLinkResource_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(); @@ -119,8 +119,8 @@ public async Task Exists_PrivateLinkResourcesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateLinkResourcesGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/PrivateLinkResources_Get.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/PrivateLinkResources_Get.json + // this example is just showing the usage of "PrivateLinkResource_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(); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedDashboardCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedDashboardCollection.cs new file mode 100644 index 000000000000..c28e92389b2b --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedDashboardCollection.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.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Grafana.Samples +{ + public partial class Sample_ManagedDashboardCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DashboardCreate() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_Create.json + // this example is just showing the usage of "ManagedDashboard_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(); + // 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-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ManagedDashboardResource + ManagedDashboardCollection collection = resourceGroupResource.GetManagedDashboards(); + + // invoke the operation + string dashboardName = "myDashboard"; + ManagedDashboardData data = new ManagedDashboardData(new AzureLocation("West US")) + { + Tags = +{ +["Environment"] = "Dev" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dashboardName, data); + ManagedDashboardResource 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 + ManagedDashboardData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DashboardGet() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_Get.json + // this example is just showing the usage of "ManagedDashboard_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 = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ManagedDashboardResource + ManagedDashboardCollection collection = resourceGroupResource.GetManagedDashboards(); + + // invoke the operation + string dashboardName = "myDashboard"; + ManagedDashboardResource result = await collection.GetAsync(dashboardName); + + // 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 + ManagedDashboardData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_DashboardListByResourceGroup() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_ListByResourceGroup.json + // this example is just showing the usage of "ManagedDashboard_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ManagedDashboardResource + ManagedDashboardCollection collection = resourceGroupResource.GetManagedDashboards(); + + // invoke the operation and iterate over the result + await foreach (ManagedDashboardResource 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 + ManagedDashboardData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_DashboardGet() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_Get.json + // this example is just showing the usage of "ManagedDashboard_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 = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ManagedDashboardResource + ManagedDashboardCollection collection = resourceGroupResource.GetManagedDashboards(); + + // invoke the operation + string dashboardName = "myDashboard"; + bool result = await collection.ExistsAsync(dashboardName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_DashboardGet() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_Get.json + // this example is just showing the usage of "ManagedDashboard_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 = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ManagedDashboardResource + ManagedDashboardCollection collection = resourceGroupResource.GetManagedDashboards(); + + // invoke the operation + string dashboardName = "myDashboard"; + NullableResponse response = await collection.GetIfExistsAsync(dashboardName); + ManagedDashboardResource 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 + ManagedDashboardData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedDashboardResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedDashboardResource.cs new file mode 100644 index 000000000000..75d4ada31bb7 --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedDashboardResource.cs @@ -0,0 +1,112 @@ +// 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.Grafana.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Grafana.Samples +{ + public partial class Sample_ManagedDashboardResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DashboardGet() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_Get.json + // this example is just showing the usage of "ManagedDashboard_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 ManagedDashboardResource created on azure + // for more information of creating ManagedDashboardResource, please refer to the document of ManagedDashboardResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string dashboardName = "myDashboard"; + ResourceIdentifier managedDashboardResourceId = ManagedDashboardResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dashboardName); + ManagedDashboardResource managedDashboard = client.GetManagedDashboardResource(managedDashboardResourceId); + + // invoke the operation + ManagedDashboardResource result = await managedDashboard.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 + ManagedDashboardData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DashboardDelete() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_Delete.json + // this example is just showing the usage of "ManagedDashboard_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 ManagedDashboardResource created on azure + // for more information of creating ManagedDashboardResource, please refer to the document of ManagedDashboardResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string dashboardName = "myDashboard"; + ResourceIdentifier managedDashboardResourceId = ManagedDashboardResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dashboardName); + ManagedDashboardResource managedDashboard = client.GetManagedDashboardResource(managedDashboardResourceId); + + // invoke the operation + await managedDashboard.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_DashboardUpdate() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_Update.json + // this example is just showing the usage of "ManagedDashboard_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 ManagedDashboardResource created on azure + // for more information of creating ManagedDashboardResource, please refer to the document of ManagedDashboardResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string dashboardName = "myDashboard"; + ResourceIdentifier managedDashboardResourceId = ManagedDashboardResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dashboardName); + ManagedDashboardResource managedDashboard = client.GetManagedDashboardResource(managedDashboardResourceId); + + // invoke the operation + ManagedDashboardPatch patch = new ManagedDashboardPatch + { + Tags = +{ +["Environment"] = "Dev 2" +}, + }; + ManagedDashboardResource result = await managedDashboard.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 + ManagedDashboardData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedGrafanaCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedGrafanaCollection.cs index cdbd081b3c66..f0469361989e 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedGrafanaCollection.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedGrafanaCollection.cs @@ -22,8 +22,8 @@ public partial class Sample_ManagedGrafanaCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_GrafanaCreate() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Create.json - // this example is just showing the usage of "Grafana_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_Create.json + // this example is just showing the usage of "ManagedGrafana_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(); @@ -60,16 +60,27 @@ public async Task CreateOrUpdate_GrafanaCreate() MarketplacePlanId = "myPlanId", MarketplaceAutoRenew = MarketplaceAutoRenew.Enabled, }, - GrafanaConfigurationsSmtp = new Smtp + GrafanaConfigurations = new GrafanaConfigurations { - Enabled = true, - Host = "smtp.sendemail.com:587", - User = "username", - Password = "", - FromAddress = "test@sendemail.com", - FromName = "emailsender", - StartTLSPolicy = StartTLSPolicy.OpportunisticStartTLS, - SkipVerify = true, + Smtp = new GrafanaSmtpSettings + { + IsEnabled = true, + Host = "smtp.sendemail.com:587", + User = "username", + Password = "", + FromAddress = "test@sendemail.com", + FromName = "emailsender", + StartTLSPolicy = GrafanaStartTlsPolicy.OpportunisticStartTls, + SkipVerify = true, + }, + IsExternalEnabled = true, + Users = new GrafanaUserSettings + { + ViewersCanEdit = true, + EditorsCanAdmin = true, + }, + IsCsrfAlwaysCheckEnabled = false, + IsCaptureEnabled = false, }, GrafanaPlugins = { @@ -97,8 +108,8 @@ public async Task CreateOrUpdate_GrafanaCreate() [Ignore("Only validating compilation of examples")] public async Task Get_GrafanaGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Get.json - // this example is just showing the usage of "Grafana_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_Get.json + // this example is just showing the usage of "ManagedGrafana_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,8 +141,8 @@ public async Task Get_GrafanaGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_GrafanaListByResourceGroup() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_ListByResourceGroup.json - // this example is just showing the usage of "Grafana_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_ListByResourceGroup.json + // this example is just showing the usage of "ManagedGrafana_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(); @@ -165,8 +176,8 @@ public async Task GetAll_GrafanaListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GrafanaGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Get.json - // this example is just showing the usage of "Grafana_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_Get.json + // this example is just showing the usage of "ManagedGrafana_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(); @@ -194,8 +205,8 @@ public async Task Exists_GrafanaGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GrafanaGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Get.json - // this example is just showing the usage of "Grafana_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_Get.json + // this example is just showing the usage of "ManagedGrafana_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(); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedGrafanaResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedGrafanaResource.cs index 5aa4db4673c8..512fbac190ec 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedGrafanaResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedGrafanaResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ManagedGrafanaResource [Ignore("Only validating compilation of examples")] public async Task Get_GrafanaGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Get.json - // this example is just showing the usage of "Grafana_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_Get.json + // this example is just showing the usage of "ManagedGrafana_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(); @@ -50,8 +50,8 @@ public async Task Get_GrafanaGet() [Ignore("Only validating compilation of examples")] public async Task Delete_GrafanaDelete() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Delete.json - // this example is just showing the usage of "Grafana_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_Delete.json + // this example is just showing the usage of "ManagedGrafana_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(); @@ -76,8 +76,8 @@ public async Task Delete_GrafanaDelete() [Ignore("Only validating compilation of examples")] public async Task Update_GrafanaUpdate() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_Update.json - // this example is just showing the usage of "Grafana_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_Update.json + // this example is just showing the usage of "ManagedGrafana_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(); @@ -113,16 +113,27 @@ public async Task Update_GrafanaUpdate() MarketplacePlanId = "myPlanId", MarketplaceAutoRenew = MarketplaceAutoRenew.Enabled, }, - GrafanaConfigurationsSmtp = new Smtp + GrafanaConfigurations = new GrafanaConfigurations { - Enabled = true, - Host = "smtp.sendemail.com:587", - User = "username", - Password = "", - FromAddress = "test@sendemail.com", - FromName = "emailsender", - StartTLSPolicy = StartTLSPolicy.OpportunisticStartTLS, - SkipVerify = true, + Smtp = new GrafanaSmtpSettings + { + IsEnabled = true, + Host = "smtp.sendemail.com:587", + User = "username", + Password = "", + FromAddress = "test@sendemail.com", + FromName = "emailsender", + StartTLSPolicy = GrafanaStartTlsPolicy.OpportunisticStartTls, + SkipVerify = true, + }, + IsExternalEnabled = true, + Users = new GrafanaUserSettings + { + ViewersCanEdit = true, + EditorsCanAdmin = true, + }, + IsCsrfAlwaysCheckEnabled = false, + IsCaptureEnabled = false, }, GrafanaPlugins = { @@ -144,8 +155,8 @@ public async Task Update_GrafanaUpdate() [Ignore("Only validating compilation of examples")] public async Task CheckEnterpriseDetails_EnterpriseDetailsPost() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/EnterpriseDetails_Post.json - // this example is just showing the usage of "Grafana_CheckEnterpriseDetails" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/EnterpriseDetails_Post.json + // this example is just showing the usage of "ManagedGrafanas_CheckEnterpriseDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -170,8 +181,8 @@ public async Task CheckEnterpriseDetails_EnterpriseDetailsPost() [Ignore("Only validating compilation of examples")] public async Task FetchAvailablePlugins_GrafanaFetchAvailablePlugins() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_FetchAvailablePlugins.json - // this example is just showing the usage of "Grafana_FetchAvailablePlugins" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_FetchAvailablePlugins.json + // this example is just showing the usage of "ManagedGrafanas_FetchAvailablePlugins" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -199,8 +210,8 @@ public async Task FetchAvailablePlugins_GrafanaFetchAvailablePlugins() [Ignore("Only validating compilation of examples")] public async Task RefreshManagedPrivateEndpoint_ManagedPrivateEndpointRefresh() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Refresh.json - // this example is just showing the usage of "ManagedPrivateEndpoints_Refresh" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_Refresh.json + // this example is just showing the usage of "ManagedGrafanas_RefreshManagedPrivateEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedPrivateEndpointModelCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedPrivateEndpointModelCollection.cs index 2185a8a3c9a6..c29236a0adfa 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedPrivateEndpointModelCollection.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedPrivateEndpointModelCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_ManagedPrivateEndpointModelCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ManagedPrivateEndpointCreate() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Create.json - // this example is just showing the usage of "ManagedPrivateEndpoints_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_Create.json + // this example is just showing the usage of "ManagedPrivateEndpointModel_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(); @@ -40,14 +40,7 @@ public async Task CreateOrUpdate_ManagedPrivateEndpointCreate() // invoke the operation string managedPrivateEndpointName = "myMPEName"; - ManagedPrivateEndpointModelData data = new ManagedPrivateEndpointModelData(new AzureLocation("West US")) - { - PrivateLinkResourceId = new ResourceIdentifier("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-000000000000/resourceGroups/xx-rg/providers/Microsoft.Kusto/Clusters/sampleKustoResource"), - PrivateLinkResourceRegion = "West US", - GroupIds = { "grafana" }, - RequestMessage = "Example Request Message", - PrivateLinkServiceUri = new Uri("my-self-hosted-influxdb.westus.mydomain.com"), - }; + ManagedPrivateEndpointModelData data = new ManagedPrivateEndpointModelData(new AzureLocation("West US")); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, managedPrivateEndpointName, data); ManagedPrivateEndpointModelResource result = lro.Value; @@ -62,8 +55,8 @@ public async Task CreateOrUpdate_ManagedPrivateEndpointCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ManagedPrivateEndpointGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Get.json - // this example is just showing the usage of "ManagedPrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_Get.json + // this example is just showing the usage of "ManagedPrivateEndpointModel_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(); @@ -96,8 +89,8 @@ public async Task Get_ManagedPrivateEndpointGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ManagedPrivateEndpointList() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_List.json - // this example is just showing the usage of "ManagedPrivateEndpoints_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_List.json + // this example is just showing the usage of "ManagedPrivateEndpointModel_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(); @@ -132,8 +125,8 @@ public async Task GetAll_ManagedPrivateEndpointList() [Ignore("Only validating compilation of examples")] public async Task Exists_ManagedPrivateEndpointGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Get.json - // this example is just showing the usage of "ManagedPrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_Get.json + // this example is just showing the usage of "ManagedPrivateEndpointModel_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,8 +155,8 @@ public async Task Exists_ManagedPrivateEndpointGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ManagedPrivateEndpointGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Get.json - // this example is just showing the usage of "ManagedPrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_Get.json + // this example is just showing the usage of "ManagedPrivateEndpointModel_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(); diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedPrivateEndpointModelResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedPrivateEndpointModelResource.cs index a9f4f4eb0789..55c458edc982 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedPrivateEndpointModelResource.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_ManagedPrivateEndpointModelResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ManagedPrivateEndpointModelResource [Ignore("Only validating compilation of examples")] public async Task Get_ManagedPrivateEndpointGet() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Get.json - // this example is just showing the usage of "ManagedPrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_Get.json + // this example is just showing the usage of "ManagedPrivateEndpointModel_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(); @@ -51,8 +51,8 @@ public async Task Get_ManagedPrivateEndpointGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ManagedPrivateEndpointDelete() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Delete.json - // this example is just showing the usage of "ManagedPrivateEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_Delete.json + // this example is just showing the usage of "ManagedPrivateEndpointModel_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(); @@ -78,8 +78,8 @@ public async Task Delete_ManagedPrivateEndpointDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ManagedPrivateEndpointsPatch() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/ManagedPrivateEndpoints_Patch.json - // this example is just showing the usage of "ManagedPrivateEndpoints_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/ManagedPrivateEndpoints_Patch.json + // this example is just showing the usage of "ManagedPrivateEndpointModel_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/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 0b9bae6fab94..c19005b660ae 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -20,8 +20,8 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetManagedGrafanas_GrafanaList() { - // Generated from example definition: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2023-09-01/examples/Grafana_List.json - // this example is just showing the usage of "Grafana_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-11-01-preview/Grafana_List.json + // this example is just showing the usage of "ManagedGrafana_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(); @@ -46,5 +46,36 @@ public async Task GetManagedGrafanas_GrafanaList() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetManagedDashboards_DashboardListByResourceGroup() + { + // Generated from example definition: 2024-11-01-preview/Dashboard_List.json + // this example is just showing the usage of "ManagedDashboard_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 = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ManagedDashboardResource item in subscriptionResource.GetManagedDashboardsAsync()) + { + // 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 + ManagedDashboardData 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/grafana/Azure.ResourceManager.Grafana/tests/GrafanaTestBase.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/GrafanaManagementTestBase.cs similarity index 50% rename from sdk/grafana/Azure.ResourceManager.Grafana/tests/GrafanaTestBase.cs rename to sdk/grafana/Azure.ResourceManager.Grafana/tests/GrafanaManagementTestBase.cs index c44dfd65a974..ef13a24d8b56 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/GrafanaTestBase.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tests/GrafanaManagementTestBase.cs @@ -1,26 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System.Threading.Tasks; 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.Grafana.Tests { - public class GrafanaTestBase : ManagementRecordedTestBase + public class GrafanaManagementTestBase : ManagementRecordedTestBase { - protected AzureLocation DefaultLocation => AzureLocation.EastUS; protected ArmClient Client { get; private set; } protected SubscriptionResource DefaultSubscription { get; private set; } - public GrafanaTestBase(bool isAsync) : base(isAsync) + protected GrafanaManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) { } - public GrafanaTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) + protected GrafanaManagementTestBase(bool isAsync) + : base(isAsync) { } @@ -31,20 +32,12 @@ public async Task CreateCommonClient() DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); } - protected async Task CreateResourceGroupAsync() + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) { - var resourceGroupName = Recording.GenerateAssetName("sdkTestRG-"); - var rgOp = await DefaultSubscription.GetResourceGroups().CreateOrUpdateAsync( - WaitUntil.Completed, - resourceGroupName, - new ResourceGroupData(DefaultLocation) - { - Tags = - { - { "test", "env" } - } - }); - return rgOp.Value; + 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/grafana/Azure.ResourceManager.Grafana/tests/Helpers/ResourceDataHelper.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/Helpers/ResourceDataHelper.cs deleted file mode 100644 index d6d8a0c95bde..000000000000 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/Helpers/ResourceDataHelper.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using Azure.ResourceManager.Grafana.Models; -using Azure.ResourceManager.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.Grafana.Tests.Helpers -{ - public class ResourceDataHelper - { - public static ManagedGrafanaData GetGrafanaResourceData(AzureLocation location) - { - return new ManagedGrafanaData(location) - { - Sku = new ManagedGrafanaSku("Standard") - }; - } - - public static void AssertGrafana(ManagedGrafanaData g1, ManagedGrafanaData g2) - { - AssertTrackedResource(g1, g2); - } - - public static void AssertTrackedResource(TrackedResourceData r1, TrackedResourceData r2) - { - Assert.AreEqual(r1.Name, r2.Name); - Assert.AreEqual(r1.Id, r2.Id); - Assert.AreEqual(r1.ResourceType, r2.ResourceType); - Assert.AreEqual(r1.Location, r2.Location); - Assert.AreEqual(r1.Tags, r2.Tags); - } - } -} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/TestsCase/GrafanaResourceCollectionTests.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/TestsCase/GrafanaResourceCollectionTests.cs deleted file mode 100644 index b1fe5e8cc749..000000000000 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/TestsCase/GrafanaResourceCollectionTests.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.Grafana.Tests.Helpers; -using NUnit.Framework; - -namespace Azure.ResourceManager.Grafana.Tests.TestsCase -{ - public class GrafanaResourceCollectionTests : GrafanaTestBase - { - public GrafanaResourceCollectionTests(bool isAsync) - : base(isAsync) - { - } - - private async Task GetCollectionAsync() - { - var resourceGroup = await CreateResourceGroupAsync(); - return resourceGroup.GetManagedGrafanas(); - } - - [TestCase] - [RecordedTest] - public async Task CreateOrUpdate() - { - var container = await GetCollectionAsync(); - var grafanaName = Recording.GenerateAssetName("sdkTestGrafana"); - var input = ResourceDataHelper.GetGrafanaResourceData(DefaultLocation); - var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, grafanaName, input); - ManagedGrafanaResource actualResource = lro.Value; - Assert.AreEqual(grafanaName, actualResource.Data.Name); - } - - [TestCase] - [RecordedTest] - public async Task Get() - { - var container = await GetCollectionAsync(); - var grafanaName = Recording.GenerateAssetName("sdkTestGrafana"); - var input = ResourceDataHelper.GetGrafanaResourceData(DefaultLocation); - var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, grafanaName, input); - ManagedGrafanaResource resource1 = lro.Value; - ManagedGrafanaResource resource2 = await container.GetAsync(grafanaName); - ResourceDataHelper.AssertGrafana(resource1.Data, resource2.Data); - } - - [TestCase] - [RecordedTest] - public async Task GetAll() - { - var container = await GetCollectionAsync(); - var grafanaName1 = Recording.GenerateAssetName("sdkTestGrafana1"); - var grafanaName2 = Recording.GenerateAssetName("sdkTestGrafana2"); - var input1 = ResourceDataHelper.GetGrafanaResourceData(DefaultLocation); - var input2 = ResourceDataHelper.GetGrafanaResourceData(DefaultLocation); - _ = await container.CreateOrUpdateAsync(WaitUntil.Completed, grafanaName1, input1); - _ = await container.CreateOrUpdateAsync(WaitUntil.Completed, grafanaName2, input2); - int count = 0; - await foreach (var appServicePlan in container.GetAllAsync()) - { - count++; - } - Assert.GreaterOrEqual(count, 2); - } - } -} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tests/TestsCase/GrafanaResourceOperationsTests.cs b/sdk/grafana/Azure.ResourceManager.Grafana/tests/TestsCase/GrafanaResourceOperationsTests.cs deleted file mode 100644 index 1ff7721a1a0a..000000000000 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tests/TestsCase/GrafanaResourceOperationsTests.cs +++ /dev/null @@ -1,35 +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.Grafana.Tests.Helpers; -using NUnit.Framework; - -namespace Azure.ResourceManager.Grafana.Tests.TestsCase -{ - public class GrafanaResourceOperationsTests : GrafanaTestBase - { - public GrafanaResourceOperationsTests(bool isAsync) - : base(isAsync) - { - } - - private async Task CreateGrafanaResourceAsync(string name) - { - var container = (await CreateResourceGroupAsync()).GetManagedGrafanas(); - var input = ResourceDataHelper.GetGrafanaResourceData(DefaultLocation); - var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); - return lro.Value; - } - - [TestCase] - [RecordedTest] - public async Task Delete() - { - var name = Recording.GenerateAssetName("sdkTestGrafana"); - var resource = await CreateGrafanaResourceAsync(name); - await resource.DeleteAsync(WaitUntil.Completed); - } - } -} diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tsp-location.yaml b/sdk/grafana/Azure.ResourceManager.Grafana/tsp-location.yaml new file mode 100644 index 000000000000..71b4be616ccc --- /dev/null +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/dashboard/Dashboard.Management +commit: 962242bf36f2af58d267c0e1df41177fdb57348e +repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/grafana/ci.mgmt.yml b/sdk/grafana/ci.mgmt.yml index a2f22e6ee33b..985fa880f9ba 100644 --- a/sdk/grafana/ci.mgmt.yml +++ b/sdk/grafana/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_DeidServiceCollection.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_DeidServiceCollection.cs similarity index 100% rename from sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_DeidServiceCollection.cs rename to sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_DeidServiceCollection.cs diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_DeidServiceResource.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_DeidServiceResource.cs similarity index 100% rename from sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_DeidServiceResource.cs rename to sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_DeidServiceResource.cs diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_HealthDataAIServicesPrivateEndpointConnectionResource.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_HealthDataAIServicesPrivateEndpointConnectionResource.cs similarity index 100% rename from sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_HealthDataAIServicesPrivateEndpointConnectionResource.cs rename to sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_HealthDataAIServicesPrivateEndpointConnectionResource.cs diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs similarity index 100% rename from sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs rename to sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_HybridConnectivityEndpointCollection.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointCollection.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_HybridConnectivityEndpointCollection.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_HybridConnectivityEndpointResource.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointResource.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_HybridConnectivityEndpointResource.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_HybridConnectivityServiceConfigurationCollection.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationCollection.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_HybridConnectivityServiceConfigurationCollection.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_HybridConnectivityServiceConfigurationResource.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationResource.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_HybridConnectivityServiceConfigurationResource.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorCollection.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorCollection.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorCollection.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorResource.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorResource.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorResource.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorSolutionConfigurationCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorSolutionConfigurationCollection.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorSolutionConfigurationCollection.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorSolutionConfigurationCollection.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorSolutionConfigurationResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorSolutionConfigurationResource.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorSolutionConfigurationResource.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorSolutionConfigurationResource.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorSolutionTypeCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorSolutionTypeCollection.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorSolutionTypeCollection.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorSolutionTypeCollection.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorSolutionTypeResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorSolutionTypeResource.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudConnectorSolutionTypeResource.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudConnectorSolutionTypeResource.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudInventoryCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudInventoryCollection.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudInventoryCollection.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudInventoryCollection.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudInventoryResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudInventoryResource.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_PublicCloudInventoryResource.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_PublicCloudInventoryResource.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/Azure.ResourceManager.InformaticaDataManagement.sln b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/Azure.ResourceManager.InformaticaDataManagement.sln index 8ebb75417c8a..2e0d8abd14e9 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/Azure.ResourceManager.InformaticaDataManagement.sln +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/Azure.ResourceManager.InformaticaDataManagement.sln @@ -7,8 +7,6 @@ Project("{66C01A99-F8DE-4A87-B0B0-43A39D527041}") = "Azure.ResourceManager.Infor EndProject Project("{66C01A99-F8DE-4A87-B0B0-43A39D527041}") = "Azure.ResourceManager.InformaticaDataManagement.Tests", "tests\Azure.ResourceManager.InformaticaDataManagement.Tests.csproj", "{9329AC8C-D588-44B5-944D-55C212F870AF}" EndProject -Project("{66C01A99-F8DE-4A87-B0B0-43A39D527041}") = "Azure.ResourceManager.InformaticaDataManagement.Samples", "samples\Azure.ResourceManager.InformaticaDataManagement.Samples.csproj", "{B31F8DA3-633B-42FF-867D-1CBBBADD54B1}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Azure.ResourceManager.InformaticaDataManagement.Samples.csproj b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Azure.ResourceManager.InformaticaDataManagement.Samples.csproj deleted file mode 100644 index 54066f43440d..000000000000 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Azure.ResourceManager.InformaticaDataManagement.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tests/Generated/Samples/Sample_InformaticaOrganizationCollection.cs similarity index 100% rename from sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationCollection.cs rename to sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tests/Generated/Samples/Sample_InformaticaOrganizationCollection.cs diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tests/Generated/Samples/Sample_InformaticaOrganizationResource.cs similarity index 100% rename from sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaOrganizationResource.cs rename to sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tests/Generated/Samples/Sample_InformaticaOrganizationResource.cs diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tests/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs similarity index 100% rename from sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs rename to sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tests/Generated/Samples/Sample_InformaticaServerlessRuntimeCollection.cs diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tests/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs similarity index 100% rename from sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/samples/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs rename to sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tests/Generated/Samples/Sample_InformaticaServerlessRuntimeResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/Azure.ResourceManager.IotOperations.sln b/sdk/iotoperations/Azure.ResourceManager.IotOperations/Azure.ResourceManager.IotOperations.sln index 8450f8da2f0f..1a2c6699d504 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/Azure.ResourceManager.IotOperations.sln +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/Azure.ResourceManager.IotOperations.sln @@ -6,8 +6,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.IotOp EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.IotOperations.Tests", "tests\Azure.ResourceManager.IotOperations.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.IotOperations.Samples", "samples\Azure.ResourceManager.IotOperations.Samples.csproj", "{2F1CD1D4-9932-4B73-99D8-C252A67D4B46}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Azure.ResourceManager.IotOperations.Samples.csproj b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Azure.ResourceManager.IotOperations.Samples.csproj deleted file mode 100644 index e763780a9578..000000000000 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Azure.ResourceManager.IotOperations.Samples.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerAuthenticationCollection.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationCollection.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerAuthenticationCollection.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerAuthenticationResource.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationResource.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerAuthenticationResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerAuthorizationCollection.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationCollection.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerAuthorizationCollection.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerAuthorizationResource.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationResource.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerAuthorizationResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerCollection.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerCollection.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerCollection.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerListenerCollection.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerCollection.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerListenerCollection.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerListenerResource.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerResource.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerListenerResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerResource.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerResource.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsBrokerResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowCollection.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowCollection.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowCollection.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowEndpointCollection.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointCollection.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowEndpointCollection.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowEndpointResource.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointResource.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowEndpointResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowProfileCollection.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileCollection.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowProfileCollection.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowProfileResource.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileResource.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowProfileResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowResource.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowResource.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsDataflowResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsInstanceCollection.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceCollection.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsInstanceCollection.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsInstanceResource.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceResource.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_IotOperationsInstanceResource.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/iotoperations/Azure.ResourceManager.IotOperations/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.net8.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.net8.0.cs index c06b602328ed..e62c6d0f819c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.net8.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.net8.0.cs @@ -444,6 +444,7 @@ namespace Microsoft.Extensions.Azure public static partial class CertificateClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddCertificateClient(this TBuilder builder, System.Uri vaultUri) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddCertificateClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientBuilderExtensions.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientBuilderExtensions.cs index ddcb95e77e38..7beb46e0f4dc 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientBuilderExtensions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; using Azure.Security.KeyVault.Certificates; @@ -24,6 +25,8 @@ public static IAzureClientBuilder A /// /// Registers a 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 AddCertificateClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.net8.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.net8.0.cs index a38d7d49efc1..fe7bbcd99041 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.net8.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.net8.0.cs @@ -665,8 +665,10 @@ namespace Microsoft.Extensions.Azure public static partial class KeyClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddCryptographyClient(this TBuilder builder, System.Uri vaultUri) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddCryptographyClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddKeyClient(this TBuilder builder, System.Uri vaultUri) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddKeyClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientBuilderExtensions.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientBuilderExtensions.cs index 4ddc9ca1397c..7103f728559a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientBuilderExtensions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; using Azure.Security.KeyVault.Keys; using Azure.Security.KeyVault.Keys.Cryptography; @@ -34,6 +35,8 @@ public static IAzureClientBuilder AddKeyClientThe builder to extend. /// The configuration to use for the client builder. /// An Azure client builder. + [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 AddKeyClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { @@ -61,6 +64,8 @@ public static IAzureClientBuilder /// The builder to extend. /// The configuration to use for the client builder. /// An Azure client builder. + [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 AddCryptographyClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/Azure.ResourceManager.LambdaTestHyperExecute.sln b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/Azure.ResourceManager.LambdaTestHyperExecute.sln index 10aa01448ce1..cefa3822d136 100644 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/Azure.ResourceManager.LambdaTestHyperExecute.sln +++ b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/Azure.ResourceManager.LambdaTestHyperExecute.sln @@ -7,8 +7,6 @@ Project("{82B8DC48-7C93-404F-8691-AA423630F213}") = "Azure.ResourceManager.Lambd EndProject Project("{82B8DC48-7C93-404F-8691-AA423630F213}") = "Azure.ResourceManager.LambdaTestHyperExecute.Tests", "tests\Azure.ResourceManager.LambdaTestHyperExecute.Tests.csproj", "{1F60100B-40EA-4804-9C83-7616DAD87D90}" EndProject -Project("{82B8DC48-7C93-404F-8691-AA423630F213}") = "Azure.ResourceManager.LambdaTestHyperExecute.Samples", "samples\Azure.ResourceManager.LambdaTestHyperExecute.Samples.csproj", "{5A7A0CCC-1F54-4B3E-AE79-83DA2A163945}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Azure.ResourceManager.LambdaTestHyperExecute.Samples.csproj b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Azure.ResourceManager.LambdaTestHyperExecute.Samples.csproj deleted file mode 100644 index 58003d7449c8..000000000000 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Azure.ResourceManager.LambdaTestHyperExecute.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Generated/Samples/Sample_LambdaTestHyperExecuteOrganizationCollection.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/tests/Generated/Samples/Sample_LambdaTestHyperExecuteOrganizationCollection.cs similarity index 100% rename from sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Generated/Samples/Sample_LambdaTestHyperExecuteOrganizationCollection.cs rename to sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/tests/Generated/Samples/Sample_LambdaTestHyperExecuteOrganizationCollection.cs diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Generated/Samples/Sample_LambdaTestHyperExecuteOrganizationResource.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/tests/Generated/Samples/Sample_LambdaTestHyperExecuteOrganizationResource.cs similarity index 100% rename from sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Generated/Samples/Sample_LambdaTestHyperExecuteOrganizationResource.cs rename to sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/tests/Generated/Samples/Sample_LambdaTestHyperExecuteOrganizationResource.cs diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/Azure.ResourceManager.Marketplace.sln b/sdk/marketplace/Azure.ResourceManager.Marketplace/Azure.ResourceManager.Marketplace.sln index bc1eddc33f32..0ac1f6d9338d 100644 --- a/sdk/marketplace/Azure.ResourceManager.Marketplace/Azure.ResourceManager.Marketplace.sln +++ b/sdk/marketplace/Azure.ResourceManager.Marketplace/Azure.ResourceManager.Marketplace.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Marke EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Marketplace.Tests", "tests\Azure.ResourceManager.Marketplace.Tests.csproj", "{979A70DE-D021-4C54-B5E8-9804FB83F67C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Marketplace.Samples", "samples\Azure.ResourceManager.Marketplace.Samples.csproj", "{C36309D7-0416-4BAC-8F44-BBFC7458076E}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Azure.ResourceManager.Marketplace.Samples.csproj b/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Azure.ResourceManager.Marketplace.Samples.csproj deleted file mode 100644 index 1d314c03fbc6..000000000000 --- a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Azure.ResourceManager.Marketplace.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_MarketplaceAdminApprovalRequestCollection.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_MarketplaceAdminApprovalRequestCollection.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_MarketplaceAdminApprovalRequestCollection.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_MarketplaceAdminApprovalRequestCollection.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_MarketplaceAdminApprovalRequestResource.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_MarketplaceAdminApprovalRequestResource.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_MarketplaceAdminApprovalRequestResource.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_MarketplaceAdminApprovalRequestResource.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_MarketplaceApprovalRequestCollection.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_MarketplaceApprovalRequestCollection.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_MarketplaceApprovalRequestCollection.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_MarketplaceApprovalRequestCollection.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_MarketplaceApprovalRequestResource.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_MarketplaceApprovalRequestResource.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_MarketplaceApprovalRequestResource.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_MarketplaceApprovalRequestResource.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreCollection.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreCollection.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreCollection.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreCollection.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreCollectionInfoCollection.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreCollectionInfoCollection.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreCollectionInfoCollection.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreCollectionInfoCollection.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreCollectionInfoResource.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreCollectionInfoResource.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreCollectionInfoResource.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreCollectionInfoResource.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreOfferCollection.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreOfferCollection.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreOfferCollection.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreOfferCollection.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreOfferResource.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreOfferResource.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreOfferResource.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreOfferResource.cs diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreResource.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreResource.cs similarity index 100% rename from sdk/marketplace/Azure.ResourceManager.Marketplace/samples/Generated/Samples/Sample_PrivateStoreResource.cs rename to sdk/marketplace/Azure.ResourceManager.Marketplace/tests/Generated/Samples/Sample_PrivateStoreResource.cs diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/Azure.ResourceManager.MongoCluster.sln b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/Azure.ResourceManager.MongoCluster.sln index 4ef04b6bbc1b..42caa2a62211 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/Azure.ResourceManager.MongoCluster.sln +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/Azure.ResourceManager.MongoCluster.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.10.35004.147 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.MongoCluster.Samples", "samples\Azure.ResourceManager.MongoCluster.Samples.csproj", "{322467E1-41E9-45C6-B523-46594155B7E5}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.MongoCluster", "src\Azure.ResourceManager.MongoCluster.csproj", "{205EDD1F-276C-4329-B391-C62F93FE4AFB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.MongoCluster.Tests", "tests\Azure.ResourceManager.MongoCluster.Tests.csproj", "{D168B846-01D6-40BB-8952-8221AE4D45F0}" diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Azure.ResourceManager.MongoCluster.Samples.csproj b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Azure.ResourceManager.MongoCluster.Samples.csproj deleted file mode 100644 index c2d3e72ed1dc..000000000000 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Azure.ResourceManager.MongoCluster.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterCollection.cs similarity index 100% rename from sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs rename to sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterCollection.cs diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs similarity index 100% rename from sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs rename to sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs similarity index 100% rename from sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs rename to sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs similarity index 100% rename from sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs rename to sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs similarity index 100% rename from sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs rename to sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterResource.cs similarity index 100% rename from sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs rename to sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_MongoClusterResource.cs diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/mongocluster/Azure.ResourceManager.MongoCluster/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Azure.ResourceManager.MongoDBAtlas.sln b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Azure.ResourceManager.MongoDBAtlas.sln index 2038b5f7f8d6..79ab91dad92b 100644 --- a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Azure.ResourceManager.MongoDBAtlas.sln +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Azure.ResourceManager.MongoDBAtlas.sln @@ -2,8 +2,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29709.97 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.MongoDBAtlas.Samples", "samples\Azure.ResourceManager.MongoDBAtlas.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.MongoDBAtlas", "src\Azure.ResourceManager.MongoDBAtlas.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.MongoDBAtlas.Tests", "tests\Azure.ResourceManager.MongoDBAtlas.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Azure.ResourceManager.MongoDBAtlas.Samples.csproj b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Azure.ResourceManager.MongoDBAtlas.Samples.csproj deleted file mode 100644 index d2418b0b87d0..000000000000 --- a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Azure.ResourceManager.MongoDBAtlas.Samples.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationCollection.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Generated/Samples/Sample_MongoDBAtlasOrganizationCollection.cs similarity index 100% rename from sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationCollection.cs rename to sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Generated/Samples/Sample_MongoDBAtlasOrganizationCollection.cs diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationResource.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Generated/Samples/Sample_MongoDBAtlasOrganizationResource.cs similarity index 100% rename from sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationResource.cs rename to sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Generated/Samples/Sample_MongoDBAtlasOrganizationResource.cs diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/monitor/Azure.Monitor.Query/CHANGELOG.md b/sdk/monitor/Azure.Monitor.Query/CHANGELOG.md index 1c58323ef266..08b38d05b12e 100644 --- a/sdk/monitor/Azure.Monitor.Query/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.Query/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.7.0-beta.1 (Unreleased) +## 1.7.0 (2025-06-26) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added support for the `2024-02-01` metric namespaces service version to `MetricsQueryClient`. ## 1.6.0 (2024-12-03) diff --git a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.net8.0.cs b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.net8.0.cs index bd0cd413696e..49df4691f73b 100644 --- a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.net8.0.cs +++ b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.net8.0.cs @@ -141,11 +141,12 @@ public MetricsQueryClient(System.Uri endpoint, Azure.Core.TokenCredential creden } public partial class MetricsQueryClientOptions : Azure.Core.ClientOptions { - public MetricsQueryClientOptions(Azure.Monitor.Query.MetricsQueryClientOptions.ServiceVersion version = Azure.Monitor.Query.MetricsQueryClientOptions.ServiceVersion.V2018_01_01) { } + public MetricsQueryClientOptions(Azure.Monitor.Query.MetricsQueryClientOptions.ServiceVersion version = Azure.Monitor.Query.MetricsQueryClientOptions.ServiceVersion.V2024_02_01) { } public Azure.Monitor.Query.MetricsQueryAudience? Audience { get { throw null; } set { } } public enum ServiceVersion { V2018_01_01 = 1, + V2024_02_01 = 2, } } public partial class MetricsQueryOptions @@ -468,17 +469,20 @@ public static partial class LogsQueryClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddLogsQueryClient(this TBuilder builder) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddLogsQueryClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddLogsQueryClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } public static partial class MetricsClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddMetricsClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddMetricsClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } public static partial class MetricsQueryClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddMetricsQueryClient(this TBuilder builder) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddMetricsQueryClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddMetricsQueryClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs index f078bad1c26b..0730b14d915b 100644 --- a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs +++ b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs @@ -141,11 +141,12 @@ public MetricsQueryClient(System.Uri endpoint, Azure.Core.TokenCredential creden } public partial class MetricsQueryClientOptions : Azure.Core.ClientOptions { - public MetricsQueryClientOptions(Azure.Monitor.Query.MetricsQueryClientOptions.ServiceVersion version = Azure.Monitor.Query.MetricsQueryClientOptions.ServiceVersion.V2018_01_01) { } + public MetricsQueryClientOptions(Azure.Monitor.Query.MetricsQueryClientOptions.ServiceVersion version = Azure.Monitor.Query.MetricsQueryClientOptions.ServiceVersion.V2024_02_01) { } public Azure.Monitor.Query.MetricsQueryAudience? Audience { get { throw null; } set { } } public enum ServiceVersion { V2018_01_01 = 1, + V2024_02_01 = 2, } } public partial class MetricsQueryOptions diff --git a/sdk/monitor/Azure.Monitor.Query/assets.json b/sdk/monitor/Azure.Monitor.Query/assets.json index 7a1eadcd757d..046355c75dd8 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_3bd28d9e3d" + "Tag": "net/monitor/Azure.Monitor.Query_8e43bc53d8" } diff --git a/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj b/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj index 734e07024d9b..5d4eed878846 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj +++ b/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj @@ -2,7 +2,7 @@ A library for querying Azure Monitor's Logs and Metrics data sources. Azure Monitor Query client library - 1.7.0-beta.1 + 1.7.0 1.6.0 Azure Monitor Query diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs index 3c6da0bf0fa5..9dfe38a5e880 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs @@ -45,7 +45,7 @@ internal HttpMessage CreateListRequest(string resourceUri, string startTime) uri.AppendPath("/", false); uri.AppendPath(resourceUri, false); uri.AppendPath("/providers/microsoft.insights/metricNamespaces", false); - uri.AppendQuery("api-version", "2017-12-01-preview", true); + uri.AppendQuery("api-version", "2024-02-01", true); if (startTime != null) { uri.AppendQuery("startTime", startTime, true); diff --git a/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClientBuilderExtensions.cs b/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClientBuilderExtensions.cs index 25cc9d159117..54b1ee4234a2 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClientBuilderExtensions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; using Azure.Monitor.Query; @@ -30,6 +31,8 @@ public static IAzureClientBuilder AddLo /// Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddLogsQueryClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsClientBuilderExtensions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsClientBuilderExtensions.cs index 2d6810a543c2..7547ec7bfa97 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsClientBuilderExtensions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; using Azure.Monitor.Query; @@ -22,6 +23,8 @@ public static IAzureClientBuilder AddMetric /// Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddMetricsClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClientBuilderExtensions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClientBuilderExtensions.cs index d59168cdbb25..89bc645fc854 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClientBuilderExtensions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; using Azure.Monitor.Query; @@ -30,6 +31,8 @@ public static IAzureClientBuilder /// Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddMetricsQueryClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClientOptions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClientOptions.cs index 22292b9bd504..fc9d185f73cf 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClientOptions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClientOptions.cs @@ -15,7 +15,7 @@ public class MetricsQueryClientOptions: ClientOptions /// /// The latest service version supported by this client library. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V2018_01_01; + internal const ServiceVersion LatestVersion = ServiceVersion.V2024_02_01; /// /// Initializes a new instance of the class. @@ -35,12 +35,15 @@ public MetricsQueryClientOptions(ServiceVersion version = LatestVersion) /// public enum ServiceVersion { -#pragma warning disable CA1707 // Identifiers should not contain underscores /// /// Version 2018-01-01 of the service. /// V2018_01_01 = 1, -#pragma warning restore CA1707 // Identifiers should not contain underscores + + /// + /// Version 2024-02-01 of the service. + /// + V2024_02_01 = 2, } /// diff --git a/sdk/monitor/Azure.Monitor.Query/src/autorest.md b/sdk/monitor/Azure.Monitor.Query/src/autorest.md index f1b4db8a020d..659be2a9e6dd 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/autorest.md +++ b/sdk/monitor/Azure.Monitor.Query/src/autorest.md @@ -7,7 +7,7 @@ title: MonitorQuery input-file: - https://github.com/Azure/azure-rest-api-specs/blob/0373f0edc4414fd402603fac51d0df93f1f70507/specification/monitor/resource-manager/Microsoft.Insights/stable/2023-10-01/metricDefinitions_API.json - https://github.com/Azure/azure-rest-api-specs/blob/0373f0edc4414fd402603fac51d0df93f1f70507/specification/monitor/resource-manager/Microsoft.Insights/stable/2023-10-01/metrics_API.json - - https://github.com/Azure/azure-rest-api-specs/blob/0373f0edc4414fd402603fac51d0df93f1f70507/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json + - https://github.com/Azure/azure-rest-api-specs/blob/0b64ca7cbe3af8cd13228dfb783a16b8272b8be2/specification/monitor/resource-manager/Microsoft.Insights/stable/2024-02-01/metricNamespaces_API.json - https://github.com/Azure/azure-rest-api-specs/blob/0550754fb421cd3a5859abf6713a542b682f626c/specification/monitor/data-plane/Microsoft.Insights/stable/2023-10-01/metricBatch.json - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/21f5332f2dc7437d1446edf240e9a3d4c90c6431/specification/operationalinsights/data-plane/Microsoft.OperationalInsights/stable/2022-10-27/OperationalInsights.json generation1-convenience-client: true diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs index e9b916b972fc..7e4d1b1f98a2 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs @@ -247,9 +247,9 @@ public async Task CanListNamespacesMetrics() TestEnvironment.MetricsResource).ToEnumerableAsync(); Assert.True(results.Any(ns => - ns.Name == "microsoft.operationalinsights-workspaces" && - ns.Type == "Microsoft.Insights/metricNamespaces" && - ns.FullyQualifiedName == "microsoft.operationalinsights/workspaces")); + ns.Name.Equals("microsoft.operationalinsights-workspaces", StringComparison.OrdinalIgnoreCase) && + ns.Type.Equals("Microsoft.Insights/metricNamespaces", StringComparison.OrdinalIgnoreCase) && + ns.FullyQualifiedName.Equals("microsoft.operationalinsights/workspaces", StringComparison.OrdinalIgnoreCase))); } [RecordedTest] diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlAdvisorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlAdvisorCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlAdvisorCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlAdvisorCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlAdvisorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlAdvisorResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlAdvisorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlAdvisorResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlConfigurationCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlConfigurationCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlConfigurationCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlConfigurationResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlConfigurationResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlConfigurationResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlDatabaseCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlDatabaseCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlDatabaseCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlDatabaseResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlDatabaseResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlDatabaseResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlFirewallRuleCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFirewallRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlFirewallRuleCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlFirewallRuleResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFirewallRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlFirewallRuleResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlPrivateEndpointConnectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateEndpointConnectionCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlPrivateEndpointConnectionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateEndpointConnectionCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlPrivateEndpointConnectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateEndpointConnectionResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlPrivateEndpointConnectionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateEndpointConnectionResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateLinkResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlPrivateLinkResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateLinkResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateLinkResourceCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlPrivateLinkResourceCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateLinkResourceCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlQueryStatisticCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryStatisticCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlQueryStatisticCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryStatisticCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlQueryStatisticResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryStatisticResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlQueryStatisticResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryStatisticResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlQueryTextCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryTextCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlQueryTextCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryTextCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlQueryTextResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryTextResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlQueryTextResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryTextResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlRecommendationActionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlRecommendationActionCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlRecommendationActionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlRecommendationActionCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlRecommendationActionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlRecommendationActionResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlRecommendationActionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlRecommendationActionResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerAdministratorResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerAdministratorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerAdministratorResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerKeyCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerKeyCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerKeyCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerKeyCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerKeyResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerKeyResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerKeyResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerKeyResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlVirtualNetworkRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlVirtualNetworkRuleCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlVirtualNetworkRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlVirtualNetworkRuleCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlVirtualNetworkRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlVirtualNetworkRuleResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlVirtualNetworkRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlVirtualNetworkRuleResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlWaitStatisticCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlWaitStatisticCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlWaitStatisticCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlWaitStatisticCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlWaitStatisticResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlWaitStatisticResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlWaitStatisticResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlWaitStatisticResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_TenantResourceExtensions.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_TenantResourceExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_TenantResourceExtensions.cs diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md index 70f717f22915..6766211722ff 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md @@ -1,13 +1,25 @@ # Release History -## 1.2.0 (Unreleased) +## 1.3.0-beta.1 (Unreleased) ### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.2.0 (2025-06-25) + +### Features Added + - Upgraded api-version tag from 'package-2024-07-01' to 'package-2025-02-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/08973141b0d31a7e75d4dc43a5224a1814a0994f/specification/networkcloud/resource-manager/readme.md. ## 1.2.0-beta.1 (2025-04-25) ### Features Added + - This SDK version supports 2024-10-01-preview API version. - ClusterManager commands are updated with custom parameters AssociatedIdentity to support managing identity. - Cluster commands are updated with custom parameters AssociatedIdentity to support managing identity. @@ -21,11 +33,13 @@ ## 1.1.0 (2025-01-31) ### Features Added + - Upgraded api-version tag from 'package-2023-07-01' to 'package-2024-07-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/f999652ecea2a4bddc2b08a113617e23e98f10d4/specification/networkcloud/resource-manager/readme.md. ### Other Changes -- Upgraded Azure.Core from 1.36.0 to 1.44.1 -- Upgraded Azure.ResourceManager from 1.9.0 to 1.13.0 + +- Upgraded Azure.Core from 1.36.0 to 1.44.1. +- Upgraded Azure.ResourceManager from 1.9.0 to 1.13.0. ## 1.1.0-beta.1 (2024-11-06) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.net8.0.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.net8.0.cs index 73b9a578c925..aef875321c99 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.net8.0.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.net8.0.cs @@ -198,12 +198,12 @@ protected NetworkCloudBareMetalMachineKeySetResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string bareMetalMachineKeySetName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -316,12 +316,12 @@ protected NetworkCloudBmcKeySetResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string bmcKeySetName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -391,12 +391,12 @@ protected NetworkCloudCloudServicesNetworkResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string cloudServicesNetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -527,12 +527,12 @@ protected NetworkCloudClusterManagerResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterManagerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -597,12 +597,12 @@ protected NetworkCloudClusterMetricsConfigurationResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string metricsConfigurationName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -632,12 +632,12 @@ protected NetworkCloudClusterResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual Azure.ResourceManager.ArmOperation Deploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = 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; } @@ -849,7 +849,7 @@ protected NetworkCloudKubernetesClusterFeatureResource() { } 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 kubernetesClusterName, string featureName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -879,12 +879,12 @@ protected NetworkCloudKubernetesClusterResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string kubernetesClusterName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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 GetNetworkCloudAgentPool(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -960,11 +960,11 @@ protected NetworkCloudL2NetworkResource() { } 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 l2NetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, 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.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1038,12 +1038,12 @@ protected NetworkCloudL3NetworkResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3NetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1295,12 +1295,12 @@ protected NetworkCloudTrunkedNetworkResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trunkedNetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1386,12 +1386,12 @@ protected NetworkCloudVirtualMachineConsoleResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualMachineName, string consoleName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1456,12 +1456,12 @@ protected NetworkCloudVirtualMachineResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualMachineName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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 GetNetworkCloudVirtualMachineConsole(string consoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1537,12 +1537,12 @@ protected NetworkCloudVolumeResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string volumeName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1784,17 +1784,17 @@ public static partial class ArmNetworkCloudModelFactory public static Azure.ResourceManager.NetworkCloud.Models.KeySetUserStatus KeySetUserStatus(string azureUserName = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetUserSetupStatus? status = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetUserSetupStatus?), string statusMessage = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode KubernetesClusterNode(Azure.Core.ResourceIdentifier agentPoolArmId = null, string availabilityZone = null, Azure.Core.ResourceIdentifier bareMetalMachineArmId = null, long? cpuCores = default(long?), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus?), string detailedStatusMessage = null, long? diskSizeGB = default(long?), string image = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, long? memorySizeGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode? mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode?), string name = null, System.Collections.Generic.IEnumerable networkAttachments = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState?), Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? role = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole?), System.Collections.Generic.IEnumerable taints = null, string vmSkuName = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode KubernetesClusterNode(string agentPoolId = null, string availabilityZone = null, string bareMetalMachineId = null, long? cpuCores = default(long?), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus?), string detailedStatusMessage = null, long? diskSizeGB = default(long?), string image = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, long? memorySizeGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode? mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode?), string name = null, System.Collections.Generic.IEnumerable networkAttachments = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState?), Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? role = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole?), System.Collections.Generic.IEnumerable taints = null, string vmSkuName = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode KubernetesClusterNode(string agentPoolId, string availabilityZone, string bareMetalMachineId, long? cpuCores, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? detailedStatus, string detailedStatusMessage, long? diskSizeGB, string image, string kubernetesVersion, System.Collections.Generic.IEnumerable labels, long? memorySizeGB, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode? mode, string name, System.Collections.Generic.IEnumerable networkAttachments, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState? powerState, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? role, System.Collections.Generic.IEnumerable taints, string vmSkuName) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.LldpNeighbor LldpNeighbor(string portDescription = null, string portName = null, string systemDescription = null, string systemName = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.MachineDisk MachineDisk(long? capacityGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.MachineSkuDiskConnectionType? connection = default(Azure.ResourceManager.NetworkCloud.Models.MachineSkuDiskConnectionType?), Azure.ResourceManager.NetworkCloud.Models.DiskType? diskType = default(Azure.ResourceManager.NetworkCloud.Models.DiskType?)) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.MachineSkuSlot MachineSkuSlot(long? rackSlot = default(long?), Azure.ResourceManager.NetworkCloud.Models.BootstrapProtocol? bootstrapProtocol = default(Azure.ResourceManager.NetworkCloud.Models.BootstrapProtocol?), long? cpuCores = default(long?), long? cpuSockets = default(long?), System.Collections.Generic.IEnumerable disks = null, string generation = null, string hardwareVersion = null, long? memoryCapacityGB = default(long?), string model = null, System.Collections.Generic.IEnumerable networkInterfaces = null, long? totalThreads = default(long?), string vendor = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment NetworkAttachment(Azure.Core.ResourceIdentifier attachedNetworkArmId = null, Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? defaultGateway = default(Azure.ResourceManager.NetworkCloud.Models.DefaultGateway?), Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod), string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment NetworkAttachment(string attachedNetworkId = null, Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? defaultGateway = default(Azure.ResourceManager.NetworkCloud.Models.DefaultGateway?), Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod), string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment NetworkAttachment(string attachedNetworkId, Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? defaultGateway, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod, string ipv4Address, string ipv6Address, string macAddress, string networkAttachmentName) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(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.NetworkCloud.Models.ExtendedLocation extendedLocation, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration, System.Collections.Generic.IEnumerable availabilityZones, long count, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus, string detailedStatusMessage, string kubernetesVersion, System.Collections.Generic.IEnumerable labels, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode, Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState, System.Collections.Generic.IEnumerable taints, Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings upgradeSettings, string vmSkuName) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(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.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions = null, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration = null, System.Collections.Generic.IEnumerable availabilityZones = null, long count = (long)0, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus?), string detailedStatusMessage = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode), Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState?), System.Collections.Generic.IEnumerable taints = null, string upgradeMaxSurge = null, string vmSkuName = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(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.NetworkCloud.Models.ExtendedLocation extendedLocation, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration, System.Collections.Generic.IEnumerable availabilityZones, long count, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus, string detailedStatusMessage, string kubernetesVersion, System.Collections.Generic.IEnumerable labels, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode, Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState, System.Collections.Generic.IEnumerable taints, string upgradeMaxSurge, string vmSkuName) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(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.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions = null, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration = null, System.Collections.Generic.IEnumerable availabilityZones = null, long count = (long)0, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus?), string detailedStatusMessage = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode), Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState?), System.Collections.Generic.IEnumerable taints = null, Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings upgradeSettings = null, string vmSkuName = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetworkCloud.NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData(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.NetworkCloud.Models.ExtendedLocation extendedLocation, System.Collections.Generic.IEnumerable associatedResourceIds, string bmcConnectionString, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials bmcCredentials, string bmcMacAddress, string bootMacAddress, Azure.Core.ResourceIdentifier clusterId, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonStatus? cordonStatus, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineDetailedStatus? detailedStatus, string detailedStatusMessage, Azure.ResourceManager.NetworkCloud.Models.HardwareInventory hardwareInventory, Azure.ResourceManager.NetworkCloud.Models.HardwareValidationStatus hardwareValidationStatus, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds, string kubernetesNodeName, string kubernetesVersion, string machineClusterVersion, string machineDetails, string machineName, System.Collections.Generic.IEnumerable machineRoles, string machineSkuId, System.Net.IPAddress oamIPv4Address, string oamIPv6Address, string osImage, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerState? powerState, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineProvisioningState? provisioningState, Azure.Core.ResourceIdentifier rackId, long rackSlot, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReadyState? readyState, Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionStatus runtimeProtectionStatus, System.Collections.Generic.IEnumerable secretRotationStatus, string serialNumber, string serviceTag, System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds) { throw null; } 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 73b9a578c925..aef875321c99 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 @@ -198,12 +198,12 @@ protected NetworkCloudBareMetalMachineKeySetResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string bareMetalMachineKeySetName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -316,12 +316,12 @@ protected NetworkCloudBmcKeySetResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string bmcKeySetName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -391,12 +391,12 @@ protected NetworkCloudCloudServicesNetworkResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string cloudServicesNetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -527,12 +527,12 @@ protected NetworkCloudClusterManagerResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterManagerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -597,12 +597,12 @@ protected NetworkCloudClusterMetricsConfigurationResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string metricsConfigurationName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -632,12 +632,12 @@ protected NetworkCloudClusterResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual Azure.ResourceManager.ArmOperation Deploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = 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; } @@ -849,7 +849,7 @@ protected NetworkCloudKubernetesClusterFeatureResource() { } 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 kubernetesClusterName, string featureName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -879,12 +879,12 @@ protected NetworkCloudKubernetesClusterResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string kubernetesClusterName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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 GetNetworkCloudAgentPool(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -960,11 +960,11 @@ protected NetworkCloudL2NetworkResource() { } 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 l2NetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, 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.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1038,12 +1038,12 @@ protected NetworkCloudL3NetworkResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3NetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1295,12 +1295,12 @@ protected NetworkCloudTrunkedNetworkResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trunkedNetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1386,12 +1386,12 @@ protected NetworkCloudVirtualMachineConsoleResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualMachineName, string consoleName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1456,12 +1456,12 @@ protected NetworkCloudVirtualMachineResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualMachineName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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 GetNetworkCloudVirtualMachineConsole(string consoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1537,12 +1537,12 @@ protected NetworkCloudVolumeResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string volumeName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(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) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken 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; } @@ -1784,17 +1784,17 @@ public static partial class ArmNetworkCloudModelFactory public static Azure.ResourceManager.NetworkCloud.Models.KeySetUserStatus KeySetUserStatus(string azureUserName = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetUserSetupStatus? status = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetUserSetupStatus?), string statusMessage = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode KubernetesClusterNode(Azure.Core.ResourceIdentifier agentPoolArmId = null, string availabilityZone = null, Azure.Core.ResourceIdentifier bareMetalMachineArmId = null, long? cpuCores = default(long?), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus?), string detailedStatusMessage = null, long? diskSizeGB = default(long?), string image = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, long? memorySizeGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode? mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode?), string name = null, System.Collections.Generic.IEnumerable networkAttachments = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState?), Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? role = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole?), System.Collections.Generic.IEnumerable taints = null, string vmSkuName = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode KubernetesClusterNode(string agentPoolId = null, string availabilityZone = null, string bareMetalMachineId = null, long? cpuCores = default(long?), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus?), string detailedStatusMessage = null, long? diskSizeGB = default(long?), string image = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, long? memorySizeGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode? mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode?), string name = null, System.Collections.Generic.IEnumerable networkAttachments = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState?), Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? role = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole?), System.Collections.Generic.IEnumerable taints = null, string vmSkuName = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode KubernetesClusterNode(string agentPoolId, string availabilityZone, string bareMetalMachineId, long? cpuCores, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? detailedStatus, string detailedStatusMessage, long? diskSizeGB, string image, string kubernetesVersion, System.Collections.Generic.IEnumerable labels, long? memorySizeGB, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode? mode, string name, System.Collections.Generic.IEnumerable networkAttachments, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState? powerState, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? role, System.Collections.Generic.IEnumerable taints, string vmSkuName) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.LldpNeighbor LldpNeighbor(string portDescription = null, string portName = null, string systemDescription = null, string systemName = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.MachineDisk MachineDisk(long? capacityGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.MachineSkuDiskConnectionType? connection = default(Azure.ResourceManager.NetworkCloud.Models.MachineSkuDiskConnectionType?), Azure.ResourceManager.NetworkCloud.Models.DiskType? diskType = default(Azure.ResourceManager.NetworkCloud.Models.DiskType?)) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.MachineSkuSlot MachineSkuSlot(long? rackSlot = default(long?), Azure.ResourceManager.NetworkCloud.Models.BootstrapProtocol? bootstrapProtocol = default(Azure.ResourceManager.NetworkCloud.Models.BootstrapProtocol?), long? cpuCores = default(long?), long? cpuSockets = default(long?), System.Collections.Generic.IEnumerable disks = null, string generation = null, string hardwareVersion = null, long? memoryCapacityGB = default(long?), string model = null, System.Collections.Generic.IEnumerable networkInterfaces = null, long? totalThreads = default(long?), string vendor = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment NetworkAttachment(Azure.Core.ResourceIdentifier attachedNetworkArmId = null, Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? defaultGateway = default(Azure.ResourceManager.NetworkCloud.Models.DefaultGateway?), Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod), string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment NetworkAttachment(string attachedNetworkId = null, Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? defaultGateway = default(Azure.ResourceManager.NetworkCloud.Models.DefaultGateway?), Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod), string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment NetworkAttachment(string attachedNetworkId, Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? defaultGateway, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod, string ipv4Address, string ipv6Address, string macAddress, string networkAttachmentName) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(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.NetworkCloud.Models.ExtendedLocation extendedLocation, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration, System.Collections.Generic.IEnumerable availabilityZones, long count, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus, string detailedStatusMessage, string kubernetesVersion, System.Collections.Generic.IEnumerable labels, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode, Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState, System.Collections.Generic.IEnumerable taints, Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings upgradeSettings, string vmSkuName) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(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.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions = null, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration = null, System.Collections.Generic.IEnumerable availabilityZones = null, long count = (long)0, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus?), string detailedStatusMessage = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode), Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState?), System.Collections.Generic.IEnumerable taints = null, string upgradeMaxSurge = null, string vmSkuName = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(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.NetworkCloud.Models.ExtendedLocation extendedLocation, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration, System.Collections.Generic.IEnumerable availabilityZones, long count, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus, string detailedStatusMessage, string kubernetesVersion, System.Collections.Generic.IEnumerable labels, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode, Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState, System.Collections.Generic.IEnumerable taints, string upgradeMaxSurge, string vmSkuName) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(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.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions = null, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration = null, System.Collections.Generic.IEnumerable availabilityZones = null, long count = (long)0, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus?), string detailedStatusMessage = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode), Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState?), System.Collections.Generic.IEnumerable taints = null, Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings upgradeSettings = null, string vmSkuName = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetworkCloud.NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData(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.NetworkCloud.Models.ExtendedLocation extendedLocation, System.Collections.Generic.IEnumerable associatedResourceIds, string bmcConnectionString, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials bmcCredentials, string bmcMacAddress, string bootMacAddress, Azure.Core.ResourceIdentifier clusterId, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonStatus? cordonStatus, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineDetailedStatus? detailedStatus, string detailedStatusMessage, Azure.ResourceManager.NetworkCloud.Models.HardwareInventory hardwareInventory, Azure.ResourceManager.NetworkCloud.Models.HardwareValidationStatus hardwareValidationStatus, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds, string kubernetesNodeName, string kubernetesVersion, string machineClusterVersion, string machineDetails, string machineName, System.Collections.Generic.IEnumerable machineRoles, string machineSkuId, System.Net.IPAddress oamIPv4Address, string oamIPv6Address, string osImage, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerState? powerState, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineProvisioningState? provisioningState, Azure.Core.ResourceIdentifier rackId, long rackSlot, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReadyState? readyState, Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionStatus runtimeProtectionStatus, System.Collections.Generic.IEnumerable secretRotationStatus, string serialNumber, string serviceTag, System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds) { throw null; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Azure.ResourceManager.NetworkCloud.csproj b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Azure.ResourceManager.NetworkCloud.csproj index 15fea3aecc7a..a29362b0b1ff 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Azure.ResourceManager.NetworkCloud.csproj +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Azure.ResourceManager.NetworkCloud.csproj @@ -1,8 +1,8 @@ - 1.2.0 + 1.3.0-beta.1 - 1.1.0 + 1.2.0 Azure.ResourceManager.NetworkCloud Azure Resource Manager client SDK for Azure resource provider NetworkCloud. azure;management;arm;resource manager;networkcloud diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/ArmNetworkCloudModelFactory.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/ArmNetworkCloudModelFactory.cs index 788c1821bf4b..9148eff6e684 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/ArmNetworkCloudModelFactory.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/ArmNetworkCloudModelFactory.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 disable @@ -36,7 +36,7 @@ public static partial class ArmNetworkCloudModelFactory /// The VM SKU name that was used to create this cluster node. /// A new instance for mocking. [EditorBrowsable(EditorBrowsableState.Never)] - public static KubernetesClusterNode KubernetesClusterNode(string agentPoolId = null, string availabilityZone = null, string bareMetalMachineId = null, long? cpuCores = null, KubernetesClusterNodeDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, long? diskSizeGB = null, string image = null, string kubernetesVersion = null, IEnumerable labels = null, long? memorySizeGB = null, NetworkCloudAgentPoolMode? mode = null, string name = null, IEnumerable networkAttachments = null, KubernetesNodePowerState? powerState = null, KubernetesNodeRole? role = null, IEnumerable taints = null, string vmSkuName = null) + public static KubernetesClusterNode KubernetesClusterNode(string agentPoolId, string availabilityZone, string bareMetalMachineId, long? cpuCores, KubernetesClusterNodeDetailedStatus? detailedStatus, string detailedStatusMessage, long? diskSizeGB, string image, string kubernetesVersion, IEnumerable labels, long? memorySizeGB, NetworkCloudAgentPoolMode? mode, string name, IEnumerable networkAttachments, KubernetesNodePowerState? powerState, KubernetesNodeRole? role, IEnumerable taints, string vmSkuName) { labels ??= new List(); networkAttachments ??= new List(); @@ -88,7 +88,7 @@ public static KubernetesClusterNode KubernetesClusterNode(string agentPoolId = n /// The name of the VM SKU that determines the size of resources allocated for node VMs. /// A new instance for mocking. [EditorBrowsable(EditorBrowsableState.Never)] - public static NetworkCloudAgentPoolData NetworkCloudAgentPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, AdministratorConfiguration administratorConfiguration = null, NetworkCloudAgentConfiguration agentOptions = null, AttachedNetworkConfiguration attachedNetworkConfiguration = null, IEnumerable availabilityZones = null, long count = default, AgentPoolDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, string kubernetesVersion = null, IEnumerable labels = null, NetworkCloudAgentPoolMode mode = default, AgentPoolProvisioningState? provisioningState = null, IEnumerable taints = null, string upgradeMaxSurge = null, string vmSkuName = null) + public static NetworkCloudAgentPoolData NetworkCloudAgentPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, AdministratorConfiguration administratorConfiguration, NetworkCloudAgentConfiguration agentOptions, AttachedNetworkConfiguration attachedNetworkConfiguration, IEnumerable availabilityZones, long count, AgentPoolDetailedStatus? detailedStatus, string detailedStatusMessage, string kubernetesVersion, IEnumerable labels, NetworkCloudAgentPoolMode mode, AgentPoolProvisioningState? provisioningState, IEnumerable taints, string upgradeMaxSurge, string vmSkuName) { tags ??= new Dictionary(); availabilityZones ??= new List(); @@ -167,9 +167,9 @@ public static NetworkCloudAgentPoolData NetworkCloudAgentPoolData(ResourceIdenti /// /// A new instance for mocking. [EditorBrowsable(EditorBrowsableState.Never)] - public static NetworkAttachment NetworkAttachment(string attachedNetworkId = null, DefaultGateway? defaultGateway = null, VirtualMachineIPAllocationMethod ipAllocationMethod = default, string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) - { - return new NetworkAttachment( + public static NetworkAttachment NetworkAttachment(string attachedNetworkId, DefaultGateway? defaultGateway, VirtualMachineIPAllocationMethod ipAllocationMethod, string ipv4Address, string ipv6Address, string macAddress, string networkAttachmentName) + + => new NetworkAttachment( new ResourceIdentifier(attachedNetworkId), defaultGateway, ipAllocationMethod, @@ -178,6 +178,5 @@ public static NetworkAttachment NetworkAttachment(string attachedNetworkId = nul macAddress, networkAttachmentName, serializedAdditionalRawData: null); - } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/LongRunningOperation/CustomNetworkCloudArmOperation.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/LongRunningOperation/CustomNetworkCloudArmOperation.cs index 79a381dbbebb..07db9e3845f8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/LongRunningOperation/CustomNetworkCloudArmOperation.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/LongRunningOperation/CustomNetworkCloudArmOperation.cs @@ -72,21 +72,21 @@ private string GetOperationId(RehydrationToken? rehydrationToken) public override Response GetRawResponse() => _operation.RawResponse; /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + public override Response UpdateStatus(CancellationToken cancellationToken) => _operation.UpdateStatus(cancellationToken); /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken) => _operation.UpdateStatusAsync(cancellationToken); /// - public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + public override Response WaitForCompletionResponse(CancellationToken cancellationToken) => _operation.WaitForCompletionResponse(cancellationToken); /// - public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); /// - public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken) => _operation.WaitForCompletionResponseAsync(cancellationToken); /// - public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolCollection.cs index 9fe3493fe765..8140e6cb7d79 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolCollection.cs @@ -4,17 +4,12 @@ #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.NetworkCloud - { +{ /// /// A class representing a collection of and their operations. /// Each in the collection will belong to the same instance of . @@ -22,67 +17,56 @@ namespace Azure.ResourceManager.NetworkCloud /// public partial class NetworkCloudAgentPoolCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - /// - /// Create a new Kubernetes cluster agent pool or update the properties of the existing one. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} - /// - /// - /// Operation Id - /// AgentPools_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2025-02-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 Kubernetes cluster agent pool. - /// The request body. - /// 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 agentPoolName, NetworkCloudAgentPoolData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, agentPoolName, data, null, null, cancellationToken); - } + /// + /// Create a new Kubernetes cluster agent pool or update the properties of the existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} + /// + /// + /// Operation Id + /// AgentPools_CreateOrUpdate + /// + /// + /// 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 Kubernetes cluster agent pool. + /// The request body. + /// 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 agentPoolName, NetworkCloudAgentPoolData data, CancellationToken cancellationToken) + => CreateOrUpdate(waitUntil, agentPoolName, data, null, null, cancellationToken); - /// - /// Create a new Kubernetes cluster agent pool or update the properties of the existing one. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} - /// - /// - /// Operation Id - /// AgentPools_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2025-02-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 Kubernetes cluster agent pool. - /// The request body. - /// 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 agentPoolName, NetworkCloudAgentPoolData data, CancellationToken cancellationToken) { - return await CreateOrUpdateAsync(waitUntil, agentPoolName, data, null, null, cancellationToken).ConfigureAwait(false); - } + /// + /// Create a new Kubernetes cluster agent pool or update the properties of the existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} + /// + /// + /// Operation Id + /// AgentPools_CreateOrUpdate + /// + /// + /// 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 Kubernetes cluster agent pool. + /// The request body. + /// 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 agentPoolName, NetworkCloudAgentPoolData data, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, agentPoolName, data, null, null, cancellationToken).ConfigureAwait(false); } - } \ No newline at end of file +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolData.cs index cd7fe75c4a63..24502c95db34 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolData.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolData.cs @@ -3,11 +3,7 @@ #nullable disable -using System; -using System.Collections.Generic; using System.ComponentModel; -using Azure.Core; -using Azure.ResourceManager.Models; using Azure.ResourceManager.NetworkCloud.Models; namespace Azure.ResourceManager.NetworkCloud diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolResource.cs index 0b472b18b6b6..987858c32a7d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudAgentPoolResource /// AgentPools_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -39,10 +35,7 @@ public partial class NetworkCloudAgentPoolResource /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudAgentPoolPatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null); - } + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudAgentPoolPatch patch, CancellationToken cancellationToken) => Update(waitUntil, patch, null, null, cancellationToken); /// /// Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. @@ -56,10 +49,6 @@ public virtual ArmOperation Update(WaitUntil wait /// AgentPools_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -69,10 +58,7 @@ public virtual ArmOperation Update(WaitUntil wait /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudAgentPoolPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null).ConfigureAwait(false); - } + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudAgentPoolPatch patch, CancellationToken cancellationToken) => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided Kubernetes cluster agent pool. @@ -86,10 +72,6 @@ public virtual async Task> UpdateAsy /// AgentPools_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -97,24 +79,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. /// The cancellation token to use. - public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) - { - using var scope = _networkCloudAgentPoolAgentPoolsClientDiagnostics.CreateScope("NetworkCloudAgentPoolResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudAgentPoolAgentPoolsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudAgentPoolAgentPoolsClientDiagnostics, Pipeline, _networkCloudAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided Kubernetes cluster agent pool. @@ -128,10 +93,6 @@ public virtual async Task> Delet /// AgentPools_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -139,24 +100,7 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) - { - using var scope = _networkCloudAgentPoolAgentPoolsClientDiagnostics.CreateScope("NetworkCloudAgentPoolResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudAgentPoolAgentPoolsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudAgentPoolAgentPoolsClientDiagnostics, Pipeline, _networkCloudAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided Kubernetes cluster agent pool. @@ -170,10 +114,6 @@ public virtual ArmOperation DeleteWithRespons /// AgentPools_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -213,10 +153,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// AgentPools_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetCollection.cs index a9c64a304c3a..28891f5937a5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetCollection.cs @@ -4,14 +4,9 @@ #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.NetworkCloud { @@ -34,10 +29,6 @@ public partial class NetworkCloudBareMetalMachineKeySetCollection : ArmCollectio /// BareMetalMachineKeySets_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -49,10 +40,8 @@ public partial class NetworkCloudBareMetalMachineKeySetCollection : ArmCollectio /// 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 bareMetalMachineKeySetName, NetworkCloudBareMetalMachineKeySetData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, bareMetalMachineKeySetName, data, null, null, cancellationToken); - } + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string bareMetalMachineKeySetName, NetworkCloudBareMetalMachineKeySetData data, CancellationToken cancellationToken) => CreateOrUpdate(waitUntil, bareMetalMachineKeySetName, data, null, null, cancellationToken); + /// /// Create a new bare metal machine key set or update the existing one for the provided cluster. /// @@ -65,10 +54,6 @@ public virtual ArmOperation CreateOr /// BareMetalMachineKeySets_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -80,9 +65,6 @@ public virtual ArmOperation CreateOr /// 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 bareMetalMachineKeySetName, NetworkCloudBareMetalMachineKeySetData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, bareMetalMachineKeySetName, data, null, null, cancellationToken).ConfigureAwait(false); - } + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string bareMetalMachineKeySetName, NetworkCloudBareMetalMachineKeySetData data, CancellationToken cancellationToken) => await CreateOrUpdateAsync(waitUntil, bareMetalMachineKeySetName, data, null, null, cancellationToken).ConfigureAwait(false); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetResource.cs index 7ff94371a570..6b14ed4c25b9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudBareMetalMachineKeySetResource /// BareMetalMachineKeySets_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -37,24 +33,7 @@ public partial class NetworkCloudBareMetalMachineKeySetResource /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics, Pipeline, _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the bare metal machine key set of the provided cluster. @@ -68,10 +47,6 @@ public virtual async Task> Delet /// BareMetalMachineKeySets_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -79,24 +54,7 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics, Pipeline, _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the bare metal machine key set of the provided cluster. @@ -110,10 +68,6 @@ public virtual ArmOperation DeleteWithRespons /// BareMetalMachineKeySets_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -122,7 +76,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); scope.Start(); @@ -153,10 +107,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// BareMetalMachineKeySets_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -165,7 +115,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); scope.Start(); @@ -195,10 +145,6 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// BareMetalMachineKeySets_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -208,10 +154,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudBareMetalMachineKeySetPatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudBareMetalMachineKeySetPatch patch, CancellationToken cancellationToken) => Update(waitUntil, patch, null, null, cancellationToken); + /// /// Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. /// @@ -224,10 +168,6 @@ public virtual ArmOperation Update(W /// BareMetalMachineKeySets_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -237,9 +177,6 @@ public virtual ArmOperation Update(W /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudBareMetalMachineKeySetPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudBareMetalMachineKeySetPatch patch, CancellationToken cancellationToken) => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineResource.cs index e6f1c6f31375..3a01a52a14f5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineResource.cs @@ -4,12 +4,9 @@ #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.NetworkCloud.Models; using Azure.ResourceManager.Resources; @@ -35,10 +32,6 @@ public partial class NetworkCloudBareMetalMachineResource : ArmResource /// BareMetalMachines_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -49,9 +42,7 @@ public partial class NetworkCloudBareMetalMachineResource : ArmResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudBareMetalMachinePatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. @@ -65,10 +56,6 @@ public virtual async Task> Up /// BareMetalMachines_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -79,8 +66,6 @@ public virtual async Task> Up /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudBareMetalMachinePatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetCollection.cs index f08a4ea12d0b..0272015c9b15 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetCollection.cs @@ -36,10 +36,6 @@ public partial class NetworkCloudBmcKeySetCollection : ArmCollection, IEnumerabl /// BmcKeySets_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -52,9 +48,7 @@ public partial class NetworkCloudBmcKeySetCollection : ArmCollection, IEnumerabl /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string bmcKeySetName, NetworkCloudBmcKeySetData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, bmcKeySetName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, bmcKeySetName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new baseboard management controller key set or update the existing one for the provided cluster. @@ -68,10 +62,6 @@ public virtual async Task> CreateOrU /// BmcKeySets_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -84,8 +74,6 @@ public virtual async Task> CreateOrU /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string bmcKeySetName, NetworkCloudBmcKeySetData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, bmcKeySetName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, bmcKeySetName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetResource.cs index bd26943adfb2..2384295f4883 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudBmcKeySetResource /// BmcKeySets_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -40,9 +36,7 @@ public partial class NetworkCloudBmcKeySetResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudBmcKeySetPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. @@ -56,10 +50,6 @@ public virtual async Task> UpdateAsy /// BmcKeySets_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -70,9 +60,8 @@ public virtual async Task> UpdateAsy /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudBmcKeySetPatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); + /// /// Delete the baseboard management controller key set of the provided cluster. /// @@ -85,10 +74,6 @@ public virtual ArmOperation Update(WaitUntil wait /// BmcKeySets_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -96,24 +81,8 @@ public virtual ArmOperation Update(WaitUntil wait /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudBmcKeySetBmcKeySetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBmcKeySetBmcKeySetsClientDiagnostics, Pipeline, _networkCloudBmcKeySetBmcKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the baseboard management controller key set of the provided cluster. @@ -127,10 +96,6 @@ public virtual async Task> Delet /// BmcKeySets_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -138,24 +103,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudBmcKeySetBmcKeySetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBmcKeySetBmcKeySetsClientDiagnostics, Pipeline, _networkCloudBmcKeySetBmcKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the baseboard management controller key set of the provided cluster. @@ -169,10 +118,6 @@ public virtual ArmOperation DeleteWithRespons /// BmcKeySets_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -181,7 +126,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); scope.Start(); @@ -212,10 +157,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// BmcKeySets_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -224,7 +165,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkCollection.cs index b65600b2beb4..f1dc0b00edf5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkCollection.cs @@ -35,10 +35,6 @@ public partial class NetworkCloudCloudServicesNetworkCollection : ArmCollection, /// CloudServicesNetworks_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -51,9 +47,7 @@ public partial class NetworkCloudCloudServicesNetworkCollection : ArmCollection, /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string cloudServicesNetworkName, NetworkCloudCloudServicesNetworkData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, cloudServicesNetworkName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, cloudServicesNetworkName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new cloud services network or update the properties of the existing cloud services network. @@ -67,10 +61,6 @@ public virtual async Task /// CloudServicesNetworks_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -83,8 +73,6 @@ public virtual async Task /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string cloudServicesNetworkName, NetworkCloudCloudServicesNetworkData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, cloudServicesNetworkName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, cloudServicesNetworkName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkResource.cs index 1ea1636274af..026f5deab096 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudCloudServicesNetworkResource /// CloudServicesNetworks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -40,9 +36,7 @@ public partial class NetworkCloudCloudServicesNetworkResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudCloudServicesNetworkPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. @@ -56,10 +50,6 @@ public virtual async Task /// CloudServicesNetworks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -70,9 +60,7 @@ public virtual async Task /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudCloudServicesNetworkPatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); /// /// Delete the provided cloud services network. @@ -86,10 +74,6 @@ public virtual ArmOperation Update(Wai /// CloudServicesNetworks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -97,24 +81,8 @@ public virtual ArmOperation Update(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 async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics, Pipeline, _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided cloud services network. @@ -128,10 +96,6 @@ public virtual async Task> Delet /// CloudServicesNetworks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -139,24 +103,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics, Pipeline, _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided cloud services network. @@ -170,10 +118,6 @@ public virtual ArmOperation DeleteWithRespons /// CloudServicesNetworks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -182,7 +126,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); scope.Start(); @@ -213,10 +157,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// CloudServicesNetworks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -225,7 +165,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterCollection.cs index 6cc15f2419bb..d7452fc0e146 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterCollection.cs @@ -35,10 +35,6 @@ public partial class NetworkCloudClusterCollection : ArmCollection, IEnumerable< /// Clusters_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -51,9 +47,7 @@ public partial class NetworkCloudClusterCollection : ArmCollection, IEnumerable< /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string clusterName, NetworkCloudClusterData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, clusterName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, clusterName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new cluster or update the properties of the cluster if it exists. @@ -67,10 +61,6 @@ public virtual async Task> CreateOrUpd /// Clusters_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -83,8 +73,6 @@ public virtual async Task> CreateOrUpd /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string clusterName, NetworkCloudClusterData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, clusterName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, clusterName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerCollection.cs index 3278db54a18e..928ffc887164 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerCollection.cs @@ -35,10 +35,6 @@ public partial class NetworkCloudClusterManagerCollection : ArmCollection, IEnum /// ClusterManagers_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -51,9 +47,7 @@ public partial class NetworkCloudClusterManagerCollection : ArmCollection, IEnum /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string clusterManagerName, NetworkCloudClusterManagerData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, clusterManagerName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, clusterManagerName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new cluster manager or update properties of the cluster manager if it exists. @@ -67,10 +61,6 @@ public virtual async Task> Crea /// ClusterManagers_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -83,8 +73,6 @@ public virtual async Task> Crea /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string clusterManagerName, NetworkCloudClusterManagerData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, clusterManagerName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, clusterManagerName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerResource.cs index 8ff2a0614ebf..6ecb7b8a1e19 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudClusterManagerResource /// ClusterManagers_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -39,9 +35,7 @@ public partial class NetworkCloudClusterManagerResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(NetworkCloudClusterManagerPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. @@ -55,10 +49,6 @@ public virtual async Task> UpdateAs /// ClusterManagers_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -68,9 +58,8 @@ public virtual async Task> UpdateAs /// The cancellation token to use. /// is null. public virtual Response Update(NetworkCloudClusterManagerPatch patch, CancellationToken cancellationToken) - { - return Update(patch, null, null, cancellationToken); - } + => Update(patch, null, null, cancellationToken); + /// /// Delete the provided cluster manager. /// @@ -83,10 +72,6 @@ public virtual Response Update(NetworkCloudC /// ClusterManagers_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -94,24 +79,8 @@ public virtual Response Update(NetworkCloudC /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudClusterManagerClusterManagersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterManagerClusterManagersClientDiagnostics, Pipeline, _networkCloudClusterManagerClusterManagersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided cluster manager. @@ -125,10 +94,6 @@ public virtual async Task> Delet /// ClusterManagers_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -136,24 +101,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudClusterManagerClusterManagersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterManagerClusterManagersClientDiagnostics, Pipeline, _networkCloudClusterManagerClusterManagersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided cluster manager. @@ -167,10 +116,6 @@ public virtual ArmOperation DeleteWithRespons /// ClusterManagers_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -179,7 +124,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); scope.Start(); @@ -210,10 +155,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// ClusterManagers_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -222,7 +163,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationCollection.cs index d0d63567e786..7aad25460f5d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationCollection.cs @@ -34,10 +34,6 @@ public partial class NetworkCloudClusterMetricsConfigurationCollection : ArmColl /// MetricsConfigurations_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -50,9 +46,7 @@ public partial class NetworkCloudClusterMetricsConfigurationCollection : ArmColl /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string metricsConfigurationName, NetworkCloudClusterMetricsConfigurationData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, metricsConfigurationName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, metricsConfigurationName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create new or update the existing metrics configuration of the provided cluster. @@ -66,10 +60,6 @@ public virtual async TaskMetricsConfigurations_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -82,8 +72,6 @@ public virtual async Task is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string metricsConfigurationName, NetworkCloudClusterMetricsConfigurationData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, metricsConfigurationName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, metricsConfigurationName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationResource.cs index 53303ba07c38..f106832feeb8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudClusterMetricsConfigurationResource /// MetricsConfigurations_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -40,9 +36,7 @@ public partial class NetworkCloudClusterMetricsConfigurationResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudClusterMetricsConfigurationPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. @@ -56,10 +50,6 @@ public virtual async TaskMetricsConfigurations_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -70,9 +60,8 @@ public virtual async Task The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudClusterMetricsConfigurationPatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); + /// /// Delete the metrics configuration of the provided cluster. /// @@ -85,10 +74,6 @@ public virtual ArmOperation Upd /// MetricsConfigurations_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -96,24 +81,8 @@ public virtual ArmOperation Upd /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics, Pipeline, _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the metrics configuration of the provided cluster. @@ -127,10 +96,6 @@ public virtual async Task> Delet /// MetricsConfigurations_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -138,24 +103,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics, Pipeline, _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the metrics configuration of the provided cluster. @@ -169,10 +118,6 @@ public virtual ArmOperation DeleteWithRespons /// MetricsConfigurations_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -181,7 +126,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); scope.Start(); @@ -212,10 +157,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// MetricsConfigurations_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -224,7 +165,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterResource.cs index cd9b89224586..e3afda1c0540 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudClusterResource /// Clusters_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -40,9 +36,7 @@ public partial class NetworkCloudClusterResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudClusterPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. @@ -56,10 +50,6 @@ public virtual async Task> UpdateAsync /// Clusters_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -70,9 +60,8 @@ public virtual async Task> UpdateAsync /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudClusterPatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); + /// /// Delete the provided cluster. /// @@ -85,10 +74,6 @@ public virtual ArmOperation Update(WaitUntil waitUn /// Clusters_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -96,24 +81,8 @@ public virtual ArmOperation Update(WaitUntil 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. /// The cancellation token to use. - public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudClusterClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided cluster. @@ -127,10 +96,6 @@ public virtual async Task> Delet /// Clusters_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -138,24 +103,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudClusterClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided cluster. @@ -169,10 +118,6 @@ public virtual ArmOperation DeleteWithRespons /// Clusters_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -181,7 +126,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); scope.Start(); @@ -212,10 +157,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// Clusters_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -224,7 +165,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterCollection.cs index 32f4a5631114..82bb85aef501 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterCollection.cs @@ -35,10 +35,6 @@ public partial class NetworkCloudKubernetesClusterCollection : ArmCollection, IE /// KubernetesClusters_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -51,9 +47,7 @@ public partial class NetworkCloudKubernetesClusterCollection : ArmCollection, IE /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string kubernetesClusterName, NetworkCloudKubernetesClusterData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, kubernetesClusterName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, kubernetesClusterName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new Kubernetes cluster or update the properties of the existing one. @@ -67,10 +61,6 @@ public virtual async Task> C /// KubernetesClusters_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -83,8 +73,6 @@ public virtual async Task> C /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string kubernetesClusterName, NetworkCloudKubernetesClusterData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, kubernetesClusterName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, kubernetesClusterName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterFeatureCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterFeatureCollection.cs index 7c46b41d7583..413312aa3f8a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterFeatureCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterFeatureCollection.cs @@ -34,10 +34,6 @@ public partial class NetworkCloudKubernetesClusterFeatureCollection : ArmCollect /// KubernetesClusterFeatures_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -50,9 +46,7 @@ public partial class NetworkCloudKubernetesClusterFeatureCollection : ArmCollect /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string featureName, NetworkCloudKubernetesClusterFeatureData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, featureName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, featureName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. @@ -66,10 +60,6 @@ public virtual async TaskKubernetesClusterFeatures_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -82,8 +72,6 @@ public virtual async Task is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string featureName, NetworkCloudKubernetesClusterFeatureData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, featureName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, featureName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterFeatureResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterFeatureResource.cs index 5a5636a8e5dc..616ddaf5ef75 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterFeatureResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterFeatureResource.cs @@ -36,10 +36,6 @@ public partial class NetworkCloudKubernetesClusterFeatureResource : ArmResource /// KubernetesClusterFeatures_Delete /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -48,9 +44,7 @@ public partial class NetworkCloudKubernetesClusterFeatureResource : ArmResource /// 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) - { - return await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); - } + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided Kubernetes cluster feature. @@ -64,10 +58,6 @@ public virtual async Task> Delet /// KubernetesClusterFeatures_Delete /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -75,10 +65,8 @@ public virtual async Task> Delet /// /// 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) - { - return Delete(waitUntil, null, null, cancellationToken); - } + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Patch properties of the provided Kubernetes cluster feature. @@ -92,10 +80,6 @@ public virtual ArmOperation Delete(WaitUntil /// KubernetesClusterFeatures_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -106,9 +90,7 @@ public virtual ArmOperation Delete(WaitUntil /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudKubernetesClusterFeaturePatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch properties of the provided Kubernetes cluster feature. @@ -122,10 +104,6 @@ public virtual async TaskKubernetesClusterFeatures_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -136,8 +114,6 @@ public virtual async Task The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudKubernetesClusterFeaturePatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterResource.cs index d2329ebd8609..d234fec2da9a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudKubernetesClusterResource /// KubernetesClusters_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -40,9 +36,7 @@ public partial class NetworkCloudKubernetesClusterResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudKubernetesClusterPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. @@ -56,10 +50,6 @@ public virtual async Task> U /// KubernetesClusters_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -70,9 +60,7 @@ public virtual async Task> U /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudKubernetesClusterPatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); /// /// Delete the provided Kubernetes cluster. @@ -86,10 +74,6 @@ public virtual ArmOperation Update(WaitUn /// KubernetesClusters_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -97,24 +81,8 @@ public virtual ArmOperation Update(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. /// The cancellation token to use. - public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudKubernetesClusterKubernetesClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided Kubernetes cluster. @@ -128,10 +96,6 @@ public virtual async Task> Delet /// KubernetesClusters_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -139,24 +103,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudKubernetesClusterKubernetesClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided Kubernetes cluster. @@ -170,10 +118,6 @@ public virtual ArmOperation DeleteWithRespons /// KubernetesClusters_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -182,7 +126,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); scope.Start(); @@ -213,10 +157,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// KubernetesClusters_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -225,7 +165,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkCollection.cs index ec2330d13f5a..1d6d57e96b95 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkCollection.cs @@ -37,10 +37,6 @@ public partial class NetworkCloudL2NetworkCollection : ArmCollection, IEnumerabl /// L2Networks_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -53,9 +49,7 @@ public partial class NetworkCloudL2NetworkCollection : ArmCollection, IEnumerabl /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string l2NetworkName, NetworkCloudL2NetworkData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, l2NetworkName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, l2NetworkName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new layer 2 (L2) network or update the properties of the existing network. @@ -69,10 +63,6 @@ public virtual async Task> CreateOrU /// L2Networks_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -85,8 +75,6 @@ public virtual async Task> CreateOrU /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string l2NetworkName, NetworkCloudL2NetworkData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, l2NetworkName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, l2NetworkName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkResource.cs index 6907e7b4e424..8997e2a07d51 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkResource.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 disable @@ -25,10 +25,6 @@ public partial class NetworkCloudL2NetworkResource /// L2Networks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -38,9 +34,7 @@ public partial class NetworkCloudL2NetworkResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(NetworkCloudL2NetworkPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Update tags associated with the provided layer 2 (L2) network. @@ -54,10 +48,6 @@ public virtual async Task> UpdateAsync(N /// L2Networks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -67,9 +57,7 @@ public virtual async Task> UpdateAsync(N /// The cancellation token to use. /// is null. public virtual Response Update(NetworkCloudL2NetworkPatch patch, CancellationToken cancellationToken) - { - return Update(patch, null, null, cancellationToken); - } + => Update(patch, null, null, cancellationToken); /// /// Delete the provided layer 2 (L2) network. @@ -83,10 +71,6 @@ public virtual Response Update(NetworkCloudL2Netw /// L2Networks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -94,24 +78,8 @@ public virtual Response Update(NetworkCloudL2Netw /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudL2NetworkL2NetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudL2NetworkL2NetworksClientDiagnostics, Pipeline, _networkCloudL2NetworkL2NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided layer 2 (L2) network. @@ -125,10 +93,6 @@ public virtual async Task> Delet /// L2Networks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -136,24 +100,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudL2NetworkL2NetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudL2NetworkL2NetworksClientDiagnostics, Pipeline, _networkCloudL2NetworkL2NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided layer 2 (L2) network. @@ -167,10 +115,6 @@ public virtual ArmOperation DeleteWithRespons /// L2Networks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -178,7 +122,7 @@ public virtual ArmOperation DeleteWithRespons /// /// 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) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); scope.Start(); @@ -209,10 +153,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// L2Networks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -220,7 +160,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// 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) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkCollection.cs index 761dfc863547..6cf33462c080 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkCollection.cs @@ -37,10 +37,6 @@ public partial class NetworkCloudL3NetworkCollection : ArmCollection, IEnumerabl /// L3Networks_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -53,9 +49,7 @@ public partial class NetworkCloudL3NetworkCollection : ArmCollection, IEnumerabl /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string l3NetworkName, NetworkCloudL3NetworkData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, l3NetworkName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, l3NetworkName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new layer 3 (L3) network or update the properties of the existing network. @@ -69,10 +63,6 @@ public virtual async Task> CreateOrU /// L3Networks_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -85,8 +75,6 @@ public virtual async Task> CreateOrU /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string l3NetworkName, NetworkCloudL3NetworkData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, l3NetworkName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, l3NetworkName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkResource.cs index edaa89791ec0..0a4b0cf9a4b6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudL3NetworkResource /// L3Networks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -39,9 +35,7 @@ public partial class NetworkCloudL3NetworkResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(NetworkCloudL3NetworkPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Update tags associated with the provided layer 3 (L3) network. @@ -55,10 +49,6 @@ public virtual async Task> UpdateAsync(N /// L3Networks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -68,9 +58,7 @@ public virtual async Task> UpdateAsync(N /// The cancellation token to use. /// is null. public virtual Response Update(NetworkCloudL3NetworkPatch patch, CancellationToken cancellationToken) - { - return Update(patch, null, null, cancellationToken); - } + => Update(patch, null, null, cancellationToken); /// /// Delete the provided layer 3 (L3) network. @@ -84,10 +72,6 @@ public virtual Response Update(NetworkCloudL3Netw /// L3Networks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -95,24 +79,8 @@ public virtual Response Update(NetworkCloudL3Netw /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudL3NetworkL3NetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudL3NetworkL3NetworksClientDiagnostics, Pipeline, _networkCloudL3NetworkL3NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided layer 3 (L3) network. @@ -126,10 +94,6 @@ public virtual async Task> Delet /// L3Networks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -137,24 +101,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudL3NetworkL3NetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudL3NetworkL3NetworksClientDiagnostics, Pipeline, _networkCloudL3NetworkL3NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided layer 3 (L3) network. @@ -168,10 +116,6 @@ public virtual ArmOperation DeleteWithRespons /// L3Networks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -180,7 +124,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); scope.Start(); @@ -211,10 +155,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// L3Networks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -223,7 +163,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudRackResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudRackResource.cs index 7b544f470bef..6ae239c44857 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudRackResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudRackResource.cs @@ -35,10 +35,6 @@ public partial class NetworkCloudRackResource : ArmResource /// Racks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -49,9 +45,7 @@ public partial class NetworkCloudRackResource : ArmResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudRackPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. @@ -65,10 +59,6 @@ public virtual async Task> UpdateAsync(Wa /// Racks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -79,8 +69,6 @@ public virtual async Task> UpdateAsync(Wa /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudRackPatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudStorageApplianceResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudStorageApplianceResource.cs index b6acec25044d..71f084c6897d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudStorageApplianceResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudStorageApplianceResource.cs @@ -35,10 +35,6 @@ public partial class NetworkCloudStorageApplianceResource : ArmResource /// StorageAppliances_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -49,9 +45,7 @@ public partial class NetworkCloudStorageApplianceResource : ArmResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudStorageAppliancePatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. @@ -65,10 +59,6 @@ public virtual async Task> Up /// StorageAppliances_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -79,8 +69,6 @@ public virtual async Task> Up /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudStorageAppliancePatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkCollection.cs index 3146df5e1ec3..1bdce5648da1 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkCollection.cs @@ -35,10 +35,6 @@ public partial class NetworkCloudTrunkedNetworkCollection : ArmCollection, IEnum /// TrunkedNetworks_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -51,9 +47,7 @@ public partial class NetworkCloudTrunkedNetworkCollection : ArmCollection, IEnum /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string trunkedNetworkName, NetworkCloudTrunkedNetworkData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, trunkedNetworkName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, trunkedNetworkName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new trunked network or update the properties of the existing trunked network. @@ -67,10 +61,6 @@ public virtual async Task> Crea /// TrunkedNetworks_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -83,8 +73,6 @@ public virtual async Task> Crea /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string trunkedNetworkName, NetworkCloudTrunkedNetworkData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, trunkedNetworkName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, trunkedNetworkName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkResource.cs index fb7a7108cdce..7eae9891ecf6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudTrunkedNetworkResource /// TrunkedNetworks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -39,9 +35,7 @@ public partial class NetworkCloudTrunkedNetworkResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(NetworkCloudTrunkedNetworkPatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Update tags associated with the provided trunked network. @@ -55,10 +49,6 @@ public virtual async Task> UpdateAs /// TrunkedNetworks_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -68,9 +58,7 @@ public virtual async Task> UpdateAs /// The cancellation token to use. /// is null. public virtual Response Update(NetworkCloudTrunkedNetworkPatch patch, CancellationToken cancellationToken) - { - return Update(patch, null, null, cancellationToken); - } + => Update(patch, null, null, cancellationToken); /// /// Delete the provided trunked network. @@ -84,10 +72,6 @@ public virtual Response Update(NetworkCloudT /// TrunkedNetworks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -95,24 +79,8 @@ public virtual Response Update(NetworkCloudT /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudTrunkedNetworkTrunkedNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics, Pipeline, _networkCloudTrunkedNetworkTrunkedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided trunked network. @@ -126,10 +94,6 @@ public virtual async Task> Delet /// TrunkedNetworks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -137,24 +101,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudTrunkedNetworkTrunkedNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics, Pipeline, _networkCloudTrunkedNetworkTrunkedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided trunked network. @@ -168,10 +116,6 @@ public virtual ArmOperation DeleteWithRespons /// TrunkedNetworks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -180,7 +124,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); scope.Start(); @@ -211,10 +155,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// TrunkedNetworks_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -223,7 +163,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineCollection.cs index a04b62eef435..415efabaeffd 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineCollection.cs @@ -37,10 +37,6 @@ public partial class NetworkCloudVirtualMachineCollection : ArmCollection, IEnum /// VirtualMachines_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -53,9 +49,7 @@ public partial class NetworkCloudVirtualMachineCollection : ArmCollection, IEnum /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string virtualMachineName, NetworkCloudVirtualMachineData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, virtualMachineName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, virtualMachineName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new virtual machine or update the properties of the existing virtual machine. @@ -69,10 +63,6 @@ public virtual async Task> Crea /// VirtualMachines_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -85,8 +75,6 @@ public virtual async Task> Crea /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string virtualMachineName, NetworkCloudVirtualMachineData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, virtualMachineName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, virtualMachineName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleCollection.cs index 80926e122e45..aeb23de7d573 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleCollection.cs @@ -34,10 +34,6 @@ public partial class NetworkCloudVirtualMachineConsoleCollection : ArmCollection /// Consoles_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -50,9 +46,7 @@ public partial class NetworkCloudVirtualMachineConsoleCollection : ArmCollection /// is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string consoleName, NetworkCloudVirtualMachineConsoleData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, consoleName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, consoleName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new virtual machine console or update the properties of the existing virtual machine console. @@ -66,10 +60,6 @@ public virtual async TaskConsoles_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -82,8 +72,6 @@ public virtual async Task is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string consoleName, NetworkCloudVirtualMachineConsoleData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, consoleName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, consoleName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleResource.cs index 815bbf1e9655..172a031f8516 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudVirtualMachineConsoleResource /// Consoles_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -40,9 +36,7 @@ public partial class NetworkCloudVirtualMachineConsoleResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudVirtualMachineConsolePatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. @@ -56,10 +50,6 @@ public virtual async TaskConsoles_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -70,9 +60,7 @@ public virtual async Task The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudVirtualMachineConsolePatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); /// /// Delete the provided virtual machine console. @@ -86,10 +74,6 @@ public virtual ArmOperation Update(Wa /// Consoles_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -97,24 +81,8 @@ public virtual ArmOperation Update(Wa /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudVirtualMachineConsoleConsolesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineConsoleConsolesClientDiagnostics, Pipeline, _networkCloudVirtualMachineConsoleConsolesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided virtual machine console. @@ -128,10 +96,6 @@ public virtual async Task> Delet /// Consoles_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -139,24 +103,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudVirtualMachineConsoleConsolesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineConsoleConsolesClientDiagnostics, Pipeline, _networkCloudVirtualMachineConsoleConsolesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided virtual machine console. @@ -170,10 +118,6 @@ public virtual ArmOperation DeleteWithRespons /// Consoles_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -182,7 +126,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); scope.Start(); @@ -213,10 +157,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// Consoles_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -225,7 +165,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineResource.cs index 6ea80a7d7e72..8214ebecd018 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudVirtualMachineResource /// VirtualMachines_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -40,9 +36,7 @@ public partial class NetworkCloudVirtualMachineResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudVirtualMachinePatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(waitUntil, patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. @@ -56,10 +50,6 @@ public virtual async Task> Upda /// VirtualMachines_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -70,9 +60,7 @@ public virtual async Task> Upda /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudVirtualMachinePatch patch, CancellationToken cancellationToken) - { - return Update(waitUntil, patch, null, null, cancellationToken); - } + => Update(waitUntil, patch, null, null, cancellationToken); /// /// Delete the provided virtual machine. @@ -86,10 +74,6 @@ public virtual ArmOperation Update(WaitUntil /// VirtualMachines_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -97,24 +81,8 @@ public virtual ArmOperation Update(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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided virtual machine. @@ -128,10 +96,6 @@ public virtual async Task> Delet /// VirtualMachines_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -139,24 +103,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided virtual machine. @@ -170,10 +118,6 @@ public virtual ArmOperation DeleteWithRespons /// VirtualMachines_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -182,7 +126,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); scope.Start(); @@ -213,10 +157,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// VirtualMachines_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -225,7 +165,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); scope.Start(); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeCollection.cs index a4b7635ba5fc..fe1b8e12672c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeCollection.cs @@ -37,10 +37,6 @@ public partial class NetworkCloudVolumeCollection : ArmCollection, IEnumerableVolumes_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -53,9 +49,7 @@ public partial class NetworkCloudVolumeCollection : ArmCollection, IEnumerable is an empty string, and was expected to be non-empty. /// or is null. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string volumeName, NetworkCloudVolumeData data, CancellationToken cancellationToken) - { - return await CreateOrUpdateAsync(waitUntil, volumeName, data, null, null, cancellationToken).ConfigureAwait(false); - } + => await CreateOrUpdateAsync(waitUntil, volumeName, data, null, null, cancellationToken).ConfigureAwait(false); /// /// Create a new volume or update the properties of the existing one. @@ -69,10 +63,6 @@ public virtual async Task> CreateOrUpda /// Volumes_CreateOrUpdate /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -85,8 +75,6 @@ public virtual async Task> CreateOrUpda /// is an empty string, and was expected to be non-empty. /// or is null. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string volumeName, NetworkCloudVolumeData data, CancellationToken cancellationToken) - { - return CreateOrUpdate(waitUntil, volumeName, data, null, null, cancellationToken); - } + => CreateOrUpdate(waitUntil, volumeName, data, null, null, cancellationToken); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeResource.cs index ccb3e50ee9f8..3dc17d9dc404 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeResource.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 disable @@ -26,10 +26,6 @@ public partial class NetworkCloudVolumeResource /// Volumes_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -39,9 +35,7 @@ public partial class NetworkCloudVolumeResource /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(NetworkCloudVolumePatch patch, CancellationToken cancellationToken) - { - return await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); - } + => await UpdateAsync(patch, null, null, cancellationToken).ConfigureAwait(false); /// /// Update tags associated with the provided volume. @@ -55,10 +49,6 @@ public virtual async Task> UpdateAsync(Netw /// Volumes_Update /// /// - /// Default Api Version - /// 2025-02-01 - /// - /// /// Resource /// /// @@ -68,9 +58,7 @@ public virtual async Task> UpdateAsync(Netw /// The cancellation token to use. /// is null. public virtual Response Update(NetworkCloudVolumePatch patch, CancellationToken cancellationToken) - { - return Update(patch, null, null, cancellationToken); - } + => Update(patch, null, null, cancellationToken); /// /// Delete the provided volume. @@ -84,10 +72,6 @@ public virtual Response Update(NetworkCloudVolumePat /// Volumes_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -95,24 +79,8 @@ public virtual Response Update(NetworkCloudVolumePat /// /// 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> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudVolumeVolumesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVolumeVolumesClientDiagnostics, Pipeline, _networkCloudVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, null, cancellationToken).ConfigureAwait(false); /// /// Delete the provided volume. @@ -126,10 +94,6 @@ public virtual async Task> Delet /// Volumes_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -137,24 +101,8 @@ public virtual async Task> Delet /// /// 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 DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudVolumeVolumesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVolumeVolumesClientDiagnostics, Pipeline, _networkCloudVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, null).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, null, cancellationToken); /// /// Delete the provided volume. @@ -168,10 +116,6 @@ public virtual ArmOperation DeleteWithRespons /// Volumes_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -180,7 +124,7 @@ public virtual ArmOperation DeleteWithRespons /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); scope.Start(); @@ -211,10 +155,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// Volumes_Delete /// /// - /// Default Api Version - /// 2024-06-01-preview - /// - /// /// Resource /// /// @@ -223,7 +163,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// 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. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) { using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); scope.Start(); diff --git a/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/Azure.ResourceManager.OnlineExperimentation.sln b/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/Azure.ResourceManager.OnlineExperimentation.sln index f98f8c605344..ed9a4c673e71 100644 --- a/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/Azure.ResourceManager.OnlineExperimentation.sln +++ b/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/Azure.ResourceManager.OnlineExperimentation.sln @@ -7,8 +7,6 @@ Project("{C1BF05E9-044F-4231-BA82-7C4D81215A1F}") = "Azure.ResourceManager.Onlin EndProject Project("{C1BF05E9-044F-4231-BA82-7C4D81215A1F}") = "Azure.ResourceManager.OnlineExperimentation.Tests", "tests\Azure.ResourceManager.OnlineExperimentation.Tests.csproj", "{BBC520CD-705A-4461-A31B-29CC644216D6}" EndProject -Project("{C1BF05E9-044F-4231-BA82-7C4D81215A1F}") = "Azure.ResourceManager.OnlineExperimentation.Samples", "samples\Azure.ResourceManager.OnlineExperimentation.Samples.csproj", "{1C428A65-8686-4817-A41D-7E100B9E863C}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Azure.ResourceManager.OnlineExperimentation.Samples.csproj b/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Azure.ResourceManager.OnlineExperimentation.Samples.csproj deleted file mode 100644 index 293f6b4813fd..000000000000 --- a/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Azure.ResourceManager.OnlineExperimentation.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Generated/Samples/Sample_OnlineExperimentationWorkspaceCollection.cs b/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/tests/Generated/Samples/Sample_OnlineExperimentationWorkspaceCollection.cs similarity index 100% rename from sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Generated/Samples/Sample_OnlineExperimentationWorkspaceCollection.cs rename to sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/tests/Generated/Samples/Sample_OnlineExperimentationWorkspaceCollection.cs diff --git a/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Generated/Samples/Sample_OnlineExperimentationWorkspaceResource.cs b/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/tests/Generated/Samples/Sample_OnlineExperimentationWorkspaceResource.cs similarity index 100% rename from sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Generated/Samples/Sample_OnlineExperimentationWorkspaceResource.cs rename to sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/tests/Generated/Samples/Sample_OnlineExperimentationWorkspaceResource.cs diff --git a/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_AutonomousDatabaseCollection.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_AutonomousDatabaseCollection.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_AutonomousDatabaseResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_AutonomousDatabaseResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_CloudVmClusterResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_CloudVmClusterResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExadbVmClusterResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExadbVmClusterResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExascaleDBNodeCollection.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeCollection.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExascaleDBNodeCollection.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExascaleDBNodeResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExascaleDBNodeResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExascaleDBStorageVaultCollection.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultCollection.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExascaleDBStorageVaultCollection.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExascaleDBStorageVaultResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_ExascaleDBStorageVaultResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleFlexComponentCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleFlexComponentCollection.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleFlexComponentCollection.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleFlexComponentCollection.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleFlexComponentResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleFlexComponentResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleFlexComponentResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleFlexComponentResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIMinorVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleGIMinorVersionCollection.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIMinorVersionCollection.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleGIMinorVersionCollection.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIMinorVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleGIMinorVersionResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIMinorVersionResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleGIMinorVersionResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleGIVersionCollection.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleGIVersionCollection.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleSubscriptionResource.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_OracleSubscriptionResource.cs diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/Azure.ResourceManager.PineconeVectorDB.sln b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/Azure.ResourceManager.PineconeVectorDB.sln index 90a2efa1287c..68e382ae3e4e 100644 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/Azure.ResourceManager.PineconeVectorDB.sln +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/Azure.ResourceManager.PineconeVectorDB.sln @@ -7,8 +7,6 @@ Project("{3B7CC8EB-09B2-45C1-BB53-4AD0DBE5A3AB}") = "Azure.ResourceManager.Pinec EndProject Project("{3B7CC8EB-09B2-45C1-BB53-4AD0DBE5A3AB}") = "Azure.ResourceManager.PineconeVectorDB.Tests", "tests\Azure.ResourceManager.PineconeVectorDB.Tests.csproj", "{7CA6E80F-D36B-41B2-8F7F-72CD33715F84}" EndProject -Project("{3B7CC8EB-09B2-45C1-BB53-4AD0DBE5A3AB}") = "Azure.ResourceManager.PineconeVectorDB.Samples", "samples\Azure.ResourceManager.PineconeVectorDB.Samples.csproj", "{B6567C1C-FDD3-4877-B04C-661E5CEA8C31}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Azure.ResourceManager.PineconeVectorDB.Samples.csproj b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Azure.ResourceManager.PineconeVectorDB.Samples.csproj deleted file mode 100644 index 28b41ee99f9d..000000000000 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Azure.ResourceManager.PineconeVectorDB.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Generated/Samples/Sample_PineconeVectorDBOrganizationCollection.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/tests/Generated/Samples/Sample_PineconeVectorDBOrganizationCollection.cs similarity index 100% rename from sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Generated/Samples/Sample_PineconeVectorDBOrganizationCollection.cs rename to sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/tests/Generated/Samples/Sample_PineconeVectorDBOrganizationCollection.cs diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Generated/Samples/Sample_PineconeVectorDBOrganizationResource.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/tests/Generated/Samples/Sample_PineconeVectorDBOrganizationResource.cs similarity index 100% rename from sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Generated/Samples/Sample_PineconeVectorDBOrganizationResource.cs rename to sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/tests/Generated/Samples/Sample_PineconeVectorDBOrganizationResource.cs diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/Azure.ResourceManager.LargeHeader.sln b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer.sln similarity index 77% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/Azure.ResourceManager.LargeHeader.sln rename to sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer.sln index 58d5ac5a49f7..9e3d18da7378 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/resource-manager/large-header/Azure.ResourceManager.LargeHeader.sln +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer.sln @@ -2,7 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29709.97 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.LargeHeader", "src\Azure.ResourceManager.LargeHeader.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.PlanetaryComputer.Samples", "samples\Azure.ResourceManager.PlanetaryComputer.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.PlanetaryComputer", "src\Azure.ResourceManager.PlanetaryComputer.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.PlanetaryComputer.Tests", "tests\Azure.ResourceManager.PlanetaryComputer.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -18,6 +22,10 @@ Global {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/CHANGELOG.md b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/Directory.Build.props b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/README.md b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/README.md new file mode 100644 index 000000000000..e49b2b9c4c0f --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/README.md @@ -0,0 +1,174 @@ +## Microsft Azure PlanetaryComputer client library for .NET + +The `Azure.ResourceManager.PlanetaryComputer` SDK is the **.NET Management Plane SDK** for working with `GeoCatalog` resources under the **PlanetaryComputer** service. + +It supports full **CRUD operations**, as well as **recorded** and **playback testing** using the Azure SDK's standard test framework. + +--- + +## Project Structure + +``` +sdk/ +└── planetarycomputer/ + └── Azure.ResourceManager.PlanetaryComputer/ + ├── src/ # Generated SDK source code + ├── tests/ + │ ├── Scenario/ + │ │ └── GeoCatalogCollectionTests.cs # Main scenario tests + │ ├── PlanetaryComputerManagementTestBase.cs # Base test infrastructure + │ └── PlanetaryComputerManagementTestEnvironment.cs + ├── Azure.ResourceManager.PlanetaryComputer.csproj + ├── Azure.ResourceManager.PlanetaryComputer.Tests.csproj + └── assets.json # Required for test recording/playback +``` + +--- + +## Getting started + +### Install the Package + +Install the package via [NuGet](https://www.nuget.org/): + +```bash +dotnet add package Azure.ResourceManager.PlanetaryComputer --prerelease +``` + +--- + +### Prerequisites + +- [.NET SDK 8.0+](https://dotnet.microsoft.com/download) +- [Azure SDK Test Proxy](https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md) + ```bash + dotnet tool install --global Azure.Sdk.Tools.TestProxy + ``` +- Logged in to Azure CLI: + ```bash + az login + ``` +- Set the following environment variables for test execution: + +```bash +$env:AZURE_SUBSCRIPTION_ID = "" +$env:AZURE_TEST_MODE = "Record" # or "Playback" +$env:AZURE_AUTHORITY_HOST = "https://login.microsoftonline.com" +``` +--- + +### Authenticate the Client + +To authenticate the client, use the `DefaultAzureCredential` from the Azure.Identity library. Ensure your environment is set up with the necessary Azure credentials. + +```csharp +using Azure.Identity; +using Azure.ResourceManager.PlanetaryComputer; + +var credential = new DefaultAzureCredential(); +var client = new PlanetaryComputerManagementClient(credential); +``` + +## Supported Tests + +| Test Name | Description | +|----------------------------------|---------------------------------------------| +| `CreateGeoCatalog` | Creates a GeoCatalog | +| `UpdateGeoCatalog` | Updates an existing GeoCatalog | +| `DeleteGeoCatalog` | Deletes a GeoCatalog | +| `GetGeoCatalog` | Retrieves a specific GeoCatalog | +| `ListGeoCatalogsInResourceGroup`| Lists GeoCatalogs in a resource group | +| `ListGeoCatalogsBySubscription` | Lists GeoCatalogs under a subscription | +| `CreateUpdateDeleteGeoCatalog` | Full CRUD scenario combined | + +--- + +## Running Tests + +### Record Mode (Live with Azure) + +1. Start the test proxy: + ```bash + test-proxy + ``` +2. Set mode: + ```bash + $env:AZURE_TEST_MODE = "Record" + ``` +3. Run a specific test: + ```bash + dotnet test -f net8.0 --filter "Name=CreateUpdateDeleteGeoCatalog" + ``` +4. Recordings are saved to: + ``` + .azure-sdk-for-net/.assets//net/sdk/PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer/tests/SessionRecords + ``` + +--- + +### Playback Mode (Offline Testing) + +1. Set mode: + ```bash + $env:AZURE_TEST_MODE = "Playback" + ``` +2. (Optional) Restore recordings: + ```bash + test-proxy restore -a ./assets.json + ``` +3. Run test: + ```bash + dotnet test -f net8.0 --filter "Name=CreateUpdateDeleteGeoCatalog" + ``` + +--- + + +## Key concepts + +The PlanetaryComputer SDK provides management capabilities for GeoCatalog resources. Key concepts include: +- **GeoCatalog**: Represents a catalog of geospatial data. +- **CRUD Operations**: Create, Read, Update, and Delete operations for GeoCatalog resources. +- **Authentication**: Uses Azure Active Directory for secure access. + +## Examples + +### Create a GeoCatalog + +```csharp +var geoCatalogData = new GeoCatalogData(new AzureLocation("uksouth")) +{ + Properties = new GeoCatalogProperties + { + Tier = CatalogTier.Basic + } +}; + +var geoCatalog = await client.GeoCatalogs.CreateOrUpdateAsync("resourceGroupName", "geoCatalogName", geoCatalogData); +``` + +### List GeoCatalogs + +```csharp +var geoCatalogs = await client.GeoCatalogs.ListAsync("resourceGroupName"); +foreach (var catalog in geoCatalogs) +{ + Console.WriteLine(catalog.Name); +} +``` + +## Troubleshooting + +If you encounter issues, check the following: +- Ensure Azure CLI is logged in (`az login`). +- Verify the subscription and resource group names. +- Check for network connectivity issues. + +## Next steps + +Explore additional features of the PlanetaryComputer SDK: +- [Samples Repository](https://github.com/Azure/azure-sdk-for-net) + +## Contributing + +We welcome contributions! Please see our [Contributing Guide](https://github.com/Azure/azure-sdk-for-net/blob/main/CONTRIBUTING.md) for details on how to get started. diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/api/Azure.ResourceManager.PlanetaryComputer.net8.0.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/api/Azure.ResourceManager.PlanetaryComputer.net8.0.cs new file mode 100644 index 000000000000..155bf5e2eb3d --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/api/Azure.ResourceManager.PlanetaryComputer.net8.0.cs @@ -0,0 +1,213 @@ +namespace Azure.ResourceManager.PlanetaryComputer +{ + public partial class GeoCatalogCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GeoCatalogCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string catalogName, Azure.ResourceManager.PlanetaryComputer.GeoCatalogData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string catalogName, Azure.ResourceManager.PlanetaryComputer.GeoCatalogData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string catalogName, 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 catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string catalogName, 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 GeoCatalogData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GeoCatalogData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.GeoCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.GeoCatalogData 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 GeoCatalogResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GeoCatalogResource() { } + public virtual Azure.ResourceManager.PlanetaryComputer.GeoCatalogData 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 catalogName) { 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.PlanetaryComputer.GeoCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.GeoCatalogData 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.PlanetaryComputer.Models.GeoCatalogPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class PlanetaryComputerExtensions + { + public static Azure.Response GetGeoCatalog(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetGeoCatalogAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.GeoCatalogResource GetGeoCatalogResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.GeoCatalogCollection GetGeoCatalogs(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetGeoCatalogs(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetGeoCatalogsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PlanetaryComputer.Mocking +{ + public partial class MockablePlanetaryComputerArmClient : Azure.ResourceManager.ArmResource + { + protected MockablePlanetaryComputerArmClient() { } + public virtual Azure.ResourceManager.PlanetaryComputer.GeoCatalogResource GetGeoCatalogResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockablePlanetaryComputerResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockablePlanetaryComputerResourceGroupResource() { } + public virtual Azure.Response GetGeoCatalog(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGeoCatalogAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PlanetaryComputer.GeoCatalogCollection GetGeoCatalogs() { throw null; } + } + public partial class MockablePlanetaryComputerSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockablePlanetaryComputerSubscriptionResource() { } + public virtual Azure.Pageable GetGeoCatalogs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetGeoCatalogsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PlanetaryComputer.Models +{ + public static partial class ArmPlanetaryComputerModelFactory + { + public static Azure.ResourceManager.PlanetaryComputer.GeoCatalogData GeoCatalogData(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.PlanetaryComputer.Models.GeoCatalogProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogProperties GeoCatalogProperties(Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier? tier = default(Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier?), string catalogUri = null, Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState?), Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoGeneratedDomainNameLabelScope(string value) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope NoReuse { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope SubscriptionReuse { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope TenantReuse { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope 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.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public static implicit operator Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogTier : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogTier(string value) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier Basic { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier 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.PlanetaryComputer.Models.CatalogTier left, Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier right) { throw null; } + public static implicit operator Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier left, Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GeoCatalogPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GeoCatalogPatch() { } + public Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityUpdate 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.PlanetaryComputer.Models.GeoCatalogPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogPatch 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 GeoCatalogProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GeoCatalogProperties() { } + public Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } + public string CatalogUri { get { throw null; } } + public Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogProperties 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 ManagedServiceIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedServiceIdentityType(string value) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType None { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType SystemAssignedUserAssigned { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType 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.PlanetaryComputer.Models.ManagedServiceIdentityType left, Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType left, Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ManagedServiceIdentityUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedServiceIdentityUpdate() { } + public Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType? Type { get { throw null; } set { } } + public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityUpdate 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 ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState 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.PlanetaryComputer.Models.ProvisioningState left, Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState left, Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/api/Azure.ResourceManager.PlanetaryComputer.netstandard2.0.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/api/Azure.ResourceManager.PlanetaryComputer.netstandard2.0.cs new file mode 100644 index 000000000000..155bf5e2eb3d --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/api/Azure.ResourceManager.PlanetaryComputer.netstandard2.0.cs @@ -0,0 +1,213 @@ +namespace Azure.ResourceManager.PlanetaryComputer +{ + public partial class GeoCatalogCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GeoCatalogCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string catalogName, Azure.ResourceManager.PlanetaryComputer.GeoCatalogData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string catalogName, Azure.ResourceManager.PlanetaryComputer.GeoCatalogData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string catalogName, 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 catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string catalogName, 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 GeoCatalogData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GeoCatalogData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.GeoCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.GeoCatalogData 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 GeoCatalogResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GeoCatalogResource() { } + public virtual Azure.ResourceManager.PlanetaryComputer.GeoCatalogData 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 catalogName) { 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.PlanetaryComputer.GeoCatalogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.GeoCatalogData 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.PlanetaryComputer.Models.GeoCatalogPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class PlanetaryComputerExtensions + { + public static Azure.Response GetGeoCatalog(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetGeoCatalogAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.GeoCatalogResource GetGeoCatalogResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.GeoCatalogCollection GetGeoCatalogs(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetGeoCatalogs(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetGeoCatalogsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PlanetaryComputer.Mocking +{ + public partial class MockablePlanetaryComputerArmClient : Azure.ResourceManager.ArmResource + { + protected MockablePlanetaryComputerArmClient() { } + public virtual Azure.ResourceManager.PlanetaryComputer.GeoCatalogResource GetGeoCatalogResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockablePlanetaryComputerResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockablePlanetaryComputerResourceGroupResource() { } + public virtual Azure.Response GetGeoCatalog(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGeoCatalogAsync(string catalogName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PlanetaryComputer.GeoCatalogCollection GetGeoCatalogs() { throw null; } + } + public partial class MockablePlanetaryComputerSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockablePlanetaryComputerSubscriptionResource() { } + public virtual Azure.Pageable GetGeoCatalogs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetGeoCatalogsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PlanetaryComputer.Models +{ + public static partial class ArmPlanetaryComputerModelFactory + { + public static Azure.ResourceManager.PlanetaryComputer.GeoCatalogData GeoCatalogData(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.PlanetaryComputer.Models.GeoCatalogProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogProperties GeoCatalogProperties(Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier? tier = default(Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier?), string catalogUri = null, Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState?), Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoGeneratedDomainNameLabelScope(string value) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope NoReuse { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope SubscriptionReuse { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope TenantReuse { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope 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.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public static implicit operator Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CatalogTier : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CatalogTier(string value) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier Basic { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier 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.PlanetaryComputer.Models.CatalogTier left, Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier right) { throw null; } + public static implicit operator Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier left, Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GeoCatalogPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GeoCatalogPatch() { } + public Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityUpdate 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.PlanetaryComputer.Models.GeoCatalogPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogPatch 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 GeoCatalogProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GeoCatalogProperties() { } + public Azure.ResourceManager.PlanetaryComputer.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } + public string CatalogUri { get { throw null; } } + public Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PlanetaryComputer.Models.CatalogTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.GeoCatalogProperties 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 ManagedServiceIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedServiceIdentityType(string value) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType None { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType SystemAssignedUserAssigned { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType 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.PlanetaryComputer.Models.ManagedServiceIdentityType left, Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType left, Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ManagedServiceIdentityUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedServiceIdentityUpdate() { } + public Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityType? Type { get { throw null; } set { } } + public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlanetaryComputer.Models.ManagedServiceIdentityUpdate 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 ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState 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.PlanetaryComputer.Models.ProvisioningState left, Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState left, Azure.ResourceManager.PlanetaryComputer.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/assets.json b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/assets.json new file mode 100644 index 000000000000..db5f881ed922 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/assets.json @@ -0,0 +1,8 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/planetarycomputer/Azure.ResourceManager.PlanetaryComputer", + "Tag": "net/planetarycomputer/Azure.ResourceManager.PlanetaryComputer_d1a808570c", + "ServiceDirectory": "planetarycomputer", + "SessionRecordsDirectory": "SessionRecords" + } diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Azure.ResourceManager.DatabaseWatcher.Samples.csproj b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Azure.ResourceManager.PlanetaryComputer.Samples.csproj similarity index 75% rename from sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Azure.ResourceManager.DatabaseWatcher.Samples.csproj rename to sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Azure.ResourceManager.PlanetaryComputer.Samples.csproj index 4750448f1e63..9afe1f52866d 100644 --- a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Azure.ResourceManager.DatabaseWatcher.Samples.csproj +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Azure.ResourceManager.PlanetaryComputer.Samples.csproj @@ -2,7 +2,7 @@ - + diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/GeneratedSamples.csproj b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/GeneratedSamples.csproj new file mode 100644 index 000000000000..7ee7af72add3 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/GeneratedSamples.csproj @@ -0,0 +1,21 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + + + + + + + + diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_GeoCatalogCollection.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_GeoCatalogCollection.cs new file mode 100644 index 000000000000..cdc6996c9ae2 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_GeoCatalogCollection.cs @@ -0,0 +1,212 @@ +// 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.Models; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.PlanetaryComputer.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlanetaryComputer.Samples +{ + public partial class Sample_GeoCatalogCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_GeoCatalogsCreate() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Create.json + // this example is just showing the usage of "GeoCatalog_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(); + // 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 = "ac9a1867-7476-4346-bf8b-968370fe212c"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation + string catalogName = "MyCatalog"; + GeoCatalogData data = new GeoCatalogData(new AzureLocation("eastus")) + { + Properties = new GeoCatalogProperties + { + Tier = CatalogTier.Basic, + AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.NoReuse, + }, + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/ac9a1867-7476-4346-bf8b-968370fe212c/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity")] = new UserAssignedIdentity() +}, + }, + Tags = +{ +["MyTag"] = "MyValue" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); + GeoCatalogResource 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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GeoCatalogsGet() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Get.json + // this example is just showing the usage of "GeoCatalog_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 = "ac9a1867-7476-4346-bf8b-968370fe212c"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation + string catalogName = "MyCatalog"; + GeoCatalogResource result = await collection.GetAsync(catalogName); + + // 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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_GeoCatalogsListByResourceGroup() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_ListByResourceGroup.json + // this example is just showing the usage of "GeoCatalog_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 = "ac9a1867-7476-4346-bf8b-968370fe212c"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation and iterate over the result + await foreach (GeoCatalogResource 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 + GeoCatalogData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GeoCatalogsGet() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Get.json + // this example is just showing the usage of "GeoCatalog_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 = "ac9a1867-7476-4346-bf8b-968370fe212c"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation + string catalogName = "MyCatalog"; + bool result = await collection.ExistsAsync(catalogName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GeoCatalogsGet() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Get.json + // this example is just showing the usage of "GeoCatalog_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 = "ac9a1867-7476-4346-bf8b-968370fe212c"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation + string catalogName = "MyCatalog"; + NullableResponse response = await collection.GetIfExistsAsync(catalogName); + GeoCatalogResource 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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_GeoCatalogResource.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_GeoCatalogResource.cs new file mode 100644 index 000000000000..34ace5aac654 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_GeoCatalogResource.cs @@ -0,0 +1,122 @@ +// 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.Models; +using Azure.ResourceManager.PlanetaryComputer.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlanetaryComputer.Samples +{ + public partial class Sample_GeoCatalogResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GeoCatalogsGet() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Get.json + // this example is just showing the usage of "GeoCatalog_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 GeoCatalogResource created on azure + // for more information of creating GeoCatalogResource, please refer to the document of GeoCatalogResource + string subscriptionId = "ac9a1867-7476-4346-bf8b-968370fe212c"; + string resourceGroupName = "MyResourceGroup"; + string catalogName = "MyCatalog"; + ResourceIdentifier geoCatalogResourceId = GeoCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, catalogName); + GeoCatalogResource geoCatalog = client.GetGeoCatalogResource(geoCatalogResourceId); + + // invoke the operation + GeoCatalogResource result = await geoCatalog.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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_GeoCatalogsDelete() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Delete.json + // this example is just showing the usage of "GeoCatalog_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 GeoCatalogResource created on azure + // for more information of creating GeoCatalogResource, please refer to the document of GeoCatalogResource + string subscriptionId = "ac9a1867-7476-4346-bf8b-968370fe212c"; + string resourceGroupName = "MyResourceGroup"; + string catalogName = "MyCatalog"; + ResourceIdentifier geoCatalogResourceId = GeoCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, catalogName); + GeoCatalogResource geoCatalog = client.GetGeoCatalogResource(geoCatalogResourceId); + + // invoke the operation + await geoCatalog.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_GeoCatalogsUpdate() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Update.json + // this example is just showing the usage of "GeoCatalog_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 GeoCatalogResource created on azure + // for more information of creating GeoCatalogResource, please refer to the document of GeoCatalogResource + string subscriptionId = "ac9a1867-7476-4346-bf8b-968370fe212c"; + string resourceGroupName = "MyResourceGroup"; + string catalogName = "MyCatalog"; + ResourceIdentifier geoCatalogResourceId = GeoCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, catalogName); + GeoCatalogResource geoCatalog = client.GetGeoCatalogResource(geoCatalogResourceId); + + // invoke the operation + GeoCatalogPatch patch = new GeoCatalogPatch + { + Tags = +{ +["MyTag"] = "MyValue" +}, + Identity = new ManagedServiceIdentityUpdate + { + Type = Models.ManagedServiceIdentityType.UserAssigned, + UserAssignedIdentities = +{ +["/subscriptions/ac9a1867-7476-4346-bf8b-968370fe212c/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity"] = new UserAssignedIdentity() +}, + }, + }; + ArmOperation lro = await geoCatalog.UpdateAsync(WaitUntil.Completed, patch); + GeoCatalogResource 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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..f60adfb6971d --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// 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.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlanetaryComputer.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetGeoCatalogs_GeoCatalogsListBySubscription() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_ListBySubscription.json + // this example is just showing the usage of "GeoCatalog_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 = "ac9a1867-7476-4346-bf8b-968370fe212c"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (GeoCatalogResource item in subscriptionResource.GetGeoCatalogsAsync()) + { + // 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 + GeoCatalogData 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Azure.ResourceManager.PlanetaryComputer.csproj b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Azure.ResourceManager.PlanetaryComputer.csproj new file mode 100644 index 000000000000..da5b0f0990ab --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Azure.ResourceManager.PlanetaryComputer.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider PlanetaryComputer. + 1.0.0-beta.1 + azure;management;arm;resource manager;PlanetaryComputer + Azure.ResourceManager.PlanetaryComputer + + diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ArmPlanetaryComputerModelFactory.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ArmPlanetaryComputerModelFactory.cs new file mode 100644 index 000000000000..c0cf1974e871 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ArmPlanetaryComputerModelFactory.cs @@ -0,0 +1,56 @@ +// 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.PlanetaryComputer.Models +{ + /// Model factory for models. + public static partial class ArmPlanetaryComputerModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static GeoCatalogData GeoCatalogData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GeoCatalogProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new GeoCatalogData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Tier of the catalog. This cannot be changed after the catalog is created. If not provided, defaults to Basic. + /// The URI of the catalog management UI. + /// The status of the last operation. + /// The scope of the auto-generated domain name label. If not provided, defaults to TenantReuse. + /// A new instance for mocking. + public static GeoCatalogProperties GeoCatalogProperties(CatalogTier? tier = null, string catalogUri = null, ProvisioningState? provisioningState = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null) + { + return new GeoCatalogProperties(tier, catalogUri, provisioningState, autoGeneratedDomainNameLabelScope, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerArmClient.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerArmClient.cs new file mode 100644 index 000000000000..ac41b6df6e77 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerArmClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.PlanetaryComputer.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockablePlanetaryComputerArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockablePlanetaryComputerArmClient() + { + } + + /// 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 MockablePlanetaryComputerArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockablePlanetaryComputerArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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 GeoCatalogResource GetGeoCatalogResource(ResourceIdentifier id) + { + GeoCatalogResource.ValidateResourceId(id); + return new GeoCatalogResource(Client, id); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerResourceGroupResource.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerResourceGroupResource.cs new file mode 100644 index 000000000000..88c144c45dce --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.PlanetaryComputer.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockablePlanetaryComputerResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockablePlanetaryComputerResourceGroupResource() + { + } + + /// 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 MockablePlanetaryComputerResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of GeoCatalogResources in the ResourceGroupResource. + /// An object representing collection of GeoCatalogResources and their operations over a GeoCatalogResource. + public virtual GeoCatalogCollection GetGeoCatalogs() + { + return GetCachedClient(client => new GeoCatalogCollection(client, Id)); + } + + /// + /// Get a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the catalog. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGeoCatalogAsync(string catalogName, CancellationToken cancellationToken = default) + { + return await GetGeoCatalogs().GetAsync(catalogName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the catalog. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGeoCatalog(string catalogName, CancellationToken cancellationToken = default) + { + return GetGeoCatalogs().Get(catalogName, cancellationToken); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerSubscriptionResource.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerSubscriptionResource.cs new file mode 100644 index 000000000000..b657209ab2c4 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerSubscriptionResource.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.PlanetaryComputer.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockablePlanetaryComputerSubscriptionResource : ArmResource + { + private ClientDiagnostics _geoCatalogClientDiagnostics; + private GeoCatalogsRestOperations _geoCatalogRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockablePlanetaryComputerSubscriptionResource() + { + } + + /// 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 MockablePlanetaryComputerSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics GeoCatalogClientDiagnostics => _geoCatalogClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PlanetaryComputer", GeoCatalogResource.ResourceType.Namespace, Diagnostics); + private GeoCatalogsRestOperations GeoCatalogRestClient => _geoCatalogRestClient ??= new GeoCatalogsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(GeoCatalogResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List GeoCatalog resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Orbital/geoCatalogs + /// + /// + /// Operation Id + /// GeoCatalog_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetGeoCatalogsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => GeoCatalogRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => GeoCatalogRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GeoCatalogResource(Client, GeoCatalogData.DeserializeGeoCatalogData(e)), GeoCatalogClientDiagnostics, Pipeline, "MockablePlanetaryComputerSubscriptionResource.GetGeoCatalogs", "value", "nextLink", cancellationToken); + } + + /// + /// List GeoCatalog resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Orbital/geoCatalogs + /// + /// + /// Operation Id + /// GeoCatalog_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetGeoCatalogs(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => GeoCatalogRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => GeoCatalogRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GeoCatalogResource(Client, GeoCatalogData.DeserializeGeoCatalogData(e)), GeoCatalogClientDiagnostics, Pipeline, "MockablePlanetaryComputerSubscriptionResource.GetGeoCatalogs", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/PlanetaryComputerExtensions.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/PlanetaryComputerExtensions.cs new file mode 100644 index 000000000000..d3ce6d23f989 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/PlanetaryComputerExtensions.cs @@ -0,0 +1,219 @@ +// 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.PlanetaryComputer.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.PlanetaryComputer +{ + /// A class to add extension methods to Azure.ResourceManager.PlanetaryComputer. + public static partial class PlanetaryComputerExtensions + { + private static MockablePlanetaryComputerArmClient GetMockablePlanetaryComputerArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockablePlanetaryComputerArmClient(client0)); + } + + private static MockablePlanetaryComputerResourceGroupResource GetMockablePlanetaryComputerResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockablePlanetaryComputerResourceGroupResource(client, resource.Id)); + } + + private static MockablePlanetaryComputerSubscriptionResource GetMockablePlanetaryComputerSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockablePlanetaryComputerSubscriptionResource(client, resource.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 GeoCatalogResource GetGeoCatalogResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePlanetaryComputerArmClient(client).GetGeoCatalogResource(id); + } + + /// + /// Gets a collection of GeoCatalogResources 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 GeoCatalogResources and their operations over a GeoCatalogResource. + public static GeoCatalogCollection GetGeoCatalogs(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockablePlanetaryComputerResourceGroupResource(resourceGroupResource).GetGeoCatalogs(); + } + + /// + /// Get a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the catalog. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetGeoCatalogAsync(this ResourceGroupResource resourceGroupResource, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockablePlanetaryComputerResourceGroupResource(resourceGroupResource).GetGeoCatalogAsync(catalogName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the catalog. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetGeoCatalog(this ResourceGroupResource resourceGroupResource, string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockablePlanetaryComputerResourceGroupResource(resourceGroupResource).GetGeoCatalog(catalogName, cancellationToken); + } + + /// + /// List GeoCatalog resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Orbital/geoCatalogs + /// + /// + /// Operation Id + /// GeoCatalog_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// 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 GetGeoCatalogsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePlanetaryComputerSubscriptionResource(subscriptionResource).GetGeoCatalogsAsync(cancellationToken); + } + + /// + /// List GeoCatalog resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Orbital/geoCatalogs + /// + /// + /// Operation Id + /// GeoCatalog_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// 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 GetGeoCatalogs(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePlanetaryComputerSubscriptionResource(subscriptionResource).GetGeoCatalogs(cancellationToken); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogCollection.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogCollection.cs new file mode 100644 index 000000000000..fd8b83938ea8 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogCollection.cs @@ -0,0 +1,494 @@ +// 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.PlanetaryComputer +{ + /// + /// 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 GetGeoCatalogs method from an instance of . + /// + public partial class GeoCatalogCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _geoCatalogClientDiagnostics; + private readonly GeoCatalogsRestOperations _geoCatalogRestClient; + + /// Initializes a new instance of the class for mocking. + protected GeoCatalogCollection() + { + } + + /// 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 GeoCatalogCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _geoCatalogClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlanetaryComputer", GeoCatalogResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GeoCatalogResource.ResourceType, out string geoCatalogApiVersion); + _geoCatalogRestClient = new GeoCatalogsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, geoCatalogApiVersion); +#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)); + } + + /// + /// Create a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Create + /// + /// + /// Default Api Version + /// 2025-02-11-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 catalog. + /// 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 catalogName, GeoCatalogData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _geoCatalogRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, catalogName, data, cancellationToken).ConfigureAwait(false); + var operation = new PlanetaryComputerArmOperation(new GeoCatalogOperationSource(Client), _geoCatalogClientDiagnostics, Pipeline, _geoCatalogRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, catalogName, 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 GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Create + /// + /// + /// Default Api Version + /// 2025-02-11-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 catalog. + /// 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 catalogName, GeoCatalogData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _geoCatalogRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, catalogName, data, cancellationToken); + var operation = new PlanetaryComputerArmOperation(new GeoCatalogOperationSource(Client), _geoCatalogClientDiagnostics, Pipeline, _geoCatalogRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, catalogName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogCollection.Get"); + scope.Start(); + try + { + var response = await _geoCatalogRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, catalogName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GeoCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogCollection.Get"); + scope.Start(); + try + { + var response = _geoCatalogRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, catalogName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GeoCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List GeoCatalog resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs + /// + /// + /// Operation Id + /// GeoCatalog_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-02-11-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) => _geoCatalogRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _geoCatalogRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GeoCatalogResource(Client, GeoCatalogData.DeserializeGeoCatalogData(e)), _geoCatalogClientDiagnostics, Pipeline, "GeoCatalogCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List GeoCatalog resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs + /// + /// + /// Operation Id + /// GeoCatalog_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-02-11-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) => _geoCatalogRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _geoCatalogRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GeoCatalogResource(Client, GeoCatalogData.DeserializeGeoCatalogData(e)), _geoCatalogClientDiagnostics, Pipeline, "GeoCatalogCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogCollection.Exists"); + scope.Start(); + try + { + var response = await _geoCatalogRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, catalogName, 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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogCollection.Exists"); + scope.Start(); + try + { + var response = _geoCatalogRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, catalogName, 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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _geoCatalogRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, catalogName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GeoCatalogResource(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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the catalog. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogCollection.GetIfExists"); + scope.Start(); + try + { + var response = _geoCatalogRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, catalogName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GeoCatalogResource(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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogData.Serialization.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogData.Serialization.cs new file mode 100644 index 000000000000..4eb3a14dcc42 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogData.Serialization.cs @@ -0,0 +1,196 @@ +// 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.Models; +using Azure.ResourceManager.PlanetaryComputer.Models; + +namespace Azure.ResourceManager.PlanetaryComputer +{ + public partial class GeoCatalogData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GeoCatalogData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + } + + GeoCatalogData 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(GeoCatalogData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGeoCatalogData(document.RootElement, options); + } + + internal static GeoCatalogData DeserializeGeoCatalogData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GeoCatalogProperties properties = default; + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = 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 = GeoCatalogProperties.DeserializeGeoCatalogProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GeoCatalogData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + 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, AzureResourceManagerPlanetaryComputerContext.Default); + default: + throw new FormatException($"The model {nameof(GeoCatalogData)} does not support writing '{options.Format}' format."); + } + } + + GeoCatalogData 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGeoCatalogData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GeoCatalogData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogData.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogData.cs new file mode 100644 index 000000000000..37433b9f6e04 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogData.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; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PlanetaryComputer.Models; + +namespace Azure.ResourceManager.PlanetaryComputer +{ + /// + /// A class representing the GeoCatalog data model. + /// A Microsoft Planetary Computer Pro GeoCatalog resource + /// + public partial class GeoCatalogData : 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 GeoCatalogData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal GeoCatalogData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, GeoCatalogProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GeoCatalogData() + { + } + + /// The resource-specific properties for this resource. + public GeoCatalogProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogResource.Serialization.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogResource.Serialization.cs new file mode 100644 index 000000000000..7bb0af583776 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.PlanetaryComputer +{ + public partial class GeoCatalogResource : IJsonModel + { + private static GeoCatalogData s_dataDeserializationInstance; + private static GeoCatalogData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + GeoCatalogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPlanetaryComputerContext.Default); + + GeoCatalogData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPlanetaryComputerContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogResource.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogResource.cs new file mode 100644 index 000000000000..d7949132e004 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/GeoCatalogResource.cs @@ -0,0 +1,707 @@ +// 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.PlanetaryComputer.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.PlanetaryComputer +{ + /// + /// A Class representing a GeoCatalog 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 GetGeoCatalogResource method. + /// Otherwise you can get one from its parent resource using the GetGeoCatalog method. + /// + public partial class GeoCatalogResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The catalogName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string catalogName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _geoCatalogClientDiagnostics; + private readonly GeoCatalogsRestOperations _geoCatalogRestClient; + private readonly GeoCatalogData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Orbital/geoCatalogs"; + + /// Initializes a new instance of the class for mocking. + protected GeoCatalogResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GeoCatalogResource(ArmClient client, GeoCatalogData 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 GeoCatalogResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _geoCatalogClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlanetaryComputer", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string geoCatalogApiVersion); + _geoCatalogRestClient = new GeoCatalogsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, geoCatalogApiVersion); +#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 GeoCatalogData 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 GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.Get"); + scope.Start(); + try + { + var response = await _geoCatalogRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GeoCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.Get"); + scope.Start(); + try + { + var response = _geoCatalogRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GeoCatalogResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Delete + /// + /// + /// Default Api Version + /// 2025-02-11-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 cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.Delete"); + scope.Start(); + try + { + var response = await _geoCatalogRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PlanetaryComputerArmOperation(_geoCatalogClientDiagnostics, Pipeline, _geoCatalogRestClient.CreateDeleteRequest(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) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Delete + /// + /// + /// Default Api Version + /// 2025-02-11-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 cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.Delete"); + scope.Start(); + try + { + var response = _geoCatalogRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new PlanetaryComputerArmOperation(_geoCatalogClientDiagnostics, Pipeline, _geoCatalogRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Update + /// + /// + /// Default Api Version + /// 2025-02-11-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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GeoCatalogPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.Update"); + scope.Start(); + try + { + var response = await _geoCatalogRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new PlanetaryComputerArmOperation(new GeoCatalogOperationSource(Client), _geoCatalogClientDiagnostics, Pipeline, _geoCatalogRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, 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 GeoCatalog + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Update + /// + /// + /// Default Api Version + /// 2025-02-11-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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GeoCatalogPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.Update"); + scope.Start(); + try + { + var response = _geoCatalogRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new PlanetaryComputerArmOperation(new GeoCatalogOperationSource(Client), _geoCatalogClientDiagnostics, Pipeline, _geoCatalogRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-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 = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.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 _geoCatalogRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GeoCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GeoCatalogPatch(); + 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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-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 = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.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 = _geoCatalogRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new GeoCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GeoCatalogPatch(); + 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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-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 = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.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 _geoCatalogRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GeoCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GeoCatalogPatch(); + 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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-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 = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.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 = _geoCatalogRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new GeoCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GeoCatalogPatch(); + 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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-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 = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.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 _geoCatalogRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GeoCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GeoCatalogPatch(); + 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.Orbital/geoCatalogs/{catalogName} + /// + /// + /// Operation Id + /// GeoCatalog_Get + /// + /// + /// Default Api Version + /// 2025-02-11-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 = _geoCatalogClientDiagnostics.CreateScope("GeoCatalogResource.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 = _geoCatalogRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new GeoCatalogResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GeoCatalogPatch(); + 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/Argument.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..6b7d943b8f10 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/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.PlanetaryComputer +{ + 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..6ecf5ab75a82 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/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.PlanetaryComputer +{ + 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/ChangeTrackingList.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..00588c1b682b --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/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.PlanetaryComputer +{ + 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..78f9b4780f26 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,425 @@ +// 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.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.PlanetaryComputer +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + internal static readonly BinaryData SentinelValue = BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray()); + internal static readonly JsonSerializerOptions Options = new JsonSerializerOptions { Converters = { new JsonModelConverter(WireOptions, AzureResourceManagerPlanetaryComputerContext.Default) } }; + internal static readonly JsonSerializerOptions OptionsUseManagedServiceIdentityV3 = new JsonSerializerOptions { Converters = { new JsonModelConverter(WireOptions, AzureResourceManagerPlanetaryComputerContext.Default), new ResourceManager.Models.ManagedServiceIdentityTypeV3Converter() } }; + + 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 bool IsSentinelValue(BinaryData value) + { + ReadOnlySpan sentinelSpan = SentinelValue.ToMemory().Span; + ReadOnlySpan valueSpan = value.ToMemory().Span; + return sentinelSpan.SequenceEqual(valueSpan); + } + + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "By passing in the JsonSerializerOptions with a reference to AzureResourceManagerCosmosDBContext.Default we are certain there is no AOT compat issue.")] + [UnconditionalSuppressMessage("Trimming", "IL3050", Justification = "By passing in the JsonSerializerOptions with a reference to AzureResourceManagerCosmosDBContext.Default we are certain there is no AOT compat issue.")] + public static T JsonDeserialize(string json, JsonSerializerOptions options) + { + return JsonSerializer.Deserialize(json, options); + } + + [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "By passing in the JsonSerializerOptions with a reference to AzureResourceManagerCosmosDBContext.Default we are certain there is no AOT compat issue.")] + [UnconditionalSuppressMessage("Trimming", "IL3050", Justification = "By passing in the JsonSerializerOptions with a reference to AzureResourceManagerCosmosDBContext.Default we are certain there is no AOT compat issue.")] + public static void JsonSerialize(Utf8JsonWriter writer, T data, JsonSerializerOptions options) + { + JsonSerializer.Serialize(writer, data, 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/Optional.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..8664b8d56939 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/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.PlanetaryComputer +{ + 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..b2caaa7f97ed --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/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.PlanetaryComputer +{ + 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/GeoCatalogOperationSource.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/GeoCatalogOperationSource.cs new file mode 100644 index 000000000000..ec441dd6ca65 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/GeoCatalogOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.PlanetaryComputer +{ + internal class GeoCatalogOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal GeoCatalogOperationSource(ArmClient client) + { + _client = client; + } + + GeoCatalogResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPlanetaryComputerContext.Default); + return new GeoCatalogResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPlanetaryComputerContext.Default); + return await Task.FromResult(new GeoCatalogResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/PlanetaryComputerArmOperation.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/PlanetaryComputerArmOperation.cs new file mode 100644 index 000000000000..1084060663db --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/PlanetaryComputerArmOperation.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.PlanetaryComputer +{ +#pragma warning disable SA1649 // File name should match first type name + internal class PlanetaryComputerArmOperation : 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 PlanetaryComputerArmOperation for mocking. + protected PlanetaryComputerArmOperation() + { + } + + internal PlanetaryComputerArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal PlanetaryComputerArmOperation(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, "PlanetaryComputerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerPlanetaryComputerContext.Default).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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/PlanetaryComputerArmOperationOfT.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/PlanetaryComputerArmOperationOfT.cs new file mode 100644 index 000000000000..cf6b3a0f4020 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/LongRunningOperation/PlanetaryComputerArmOperationOfT.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.PlanetaryComputer +{ +#pragma warning disable SA1649 // File name should match first type name + internal class PlanetaryComputerArmOperation : 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 PlanetaryComputerArmOperation for mocking. + protected PlanetaryComputerArmOperation() + { + } + + internal PlanetaryComputerArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal PlanetaryComputerArmOperation(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, "PlanetaryComputerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerPlanetaryComputerContext.Default).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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs new file mode 100644 index 000000000000..0857b5b7a812 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AutoGeneratedDomainNameLabelScope.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.PlanetaryComputer.Models +{ + /// The scope at which the auto-generated domain name label is generated and at which the resource name can be reused. + public readonly partial struct AutoGeneratedDomainNameLabelScope : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoGeneratedDomainNameLabelScope(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoReuseValue = "NoReuse"; + private const string TenantReuseValue = "TenantReuse"; + private const string SubscriptionReuseValue = "SubscriptionReuse"; + private const string ResourceGroupReuseValue = "ResourceGroupReuse"; + + /// The domain name label is randomly generated. The resource name cannot be reused within the same region. + public static AutoGeneratedDomainNameLabelScope NoReuse { get; } = new AutoGeneratedDomainNameLabelScope(NoReuseValue); + /// The domain name label is deterministically generated using the resource name and tenant id. The resource name cannot be reused within the same region and tenant. + public static AutoGeneratedDomainNameLabelScope TenantReuse { get; } = new AutoGeneratedDomainNameLabelScope(TenantReuseValue); + /// The domain name label is deterministically generated using the resource name, tenant id, and subscription id. The resource name cannot be reused within the same region and subscription. + public static AutoGeneratedDomainNameLabelScope SubscriptionReuse { get; } = new AutoGeneratedDomainNameLabelScope(SubscriptionReuseValue); + /// The domain name label is deterministically generated using the resource name, tenant id, subscription id, and resource group name. The resource name cannot be reused within the same resource group. + public static AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get; } = new AutoGeneratedDomainNameLabelScope(ResourceGroupReuseValue); + /// Determines if two values are the same. + public static bool operator ==(AutoGeneratedDomainNameLabelScope left, AutoGeneratedDomainNameLabelScope right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoGeneratedDomainNameLabelScope left, AutoGeneratedDomainNameLabelScope right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoGeneratedDomainNameLabelScope(string value) => new AutoGeneratedDomainNameLabelScope(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoGeneratedDomainNameLabelScope other && Equals(other); + /// + public bool Equals(AutoGeneratedDomainNameLabelScope 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AzureResourceManagerPlanetaryComputerContext.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AzureResourceManagerPlanetaryComputerContext.cs new file mode 100644 index 000000000000..5a27d4a5a9b0 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AzureResourceManagerPlanetaryComputerContext.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Azure.ResourceManager.PlanetaryComputer +{ + /// + /// Context class which will be filled in by the System.ClientModel.SourceGeneration. + /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' + /// + public partial class AzureResourceManagerPlanetaryComputerContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/CatalogTier.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/CatalogTier.cs new file mode 100644 index 000000000000..24f63bb55fbd --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/CatalogTier.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.PlanetaryComputer.Models +{ + /// The Microsoft Planetary Computer Pro GeoCatalog tier. + public readonly partial struct CatalogTier : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CatalogTier(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + + /// The basic tier that utilizes shared resources across catalog instances. + public static CatalogTier Basic { get; } = new CatalogTier(BasicValue); + /// Determines if two values are the same. + public static bool operator ==(CatalogTier left, CatalogTier right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CatalogTier left, CatalogTier right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CatalogTier(string value) => new CatalogTier(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CatalogTier other && Equals(other); + /// + public bool Equals(CatalogTier 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogListResult.Serialization.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogListResult.Serialization.cs new file mode 100644 index 000000000000..602438cefb58 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogListResult.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.PlanetaryComputer.Models +{ + internal partial class GeoCatalogListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GeoCatalogListResult)} 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GeoCatalogListResult 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(GeoCatalogListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGeoCatalogListResult(document.RootElement, options); + } + + internal static GeoCatalogListResult DeserializeGeoCatalogListResult(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(GeoCatalogData.DeserializeGeoCatalogData(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 GeoCatalogListResult(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, AzureResourceManagerPlanetaryComputerContext.Default); + default: + throw new FormatException($"The model {nameof(GeoCatalogListResult)} does not support writing '{options.Format}' format."); + } + } + + GeoCatalogListResult 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGeoCatalogListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GeoCatalogListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogListResult.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogListResult.cs new file mode 100644 index 000000000000..23354a592930 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogListResult.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.PlanetaryComputer.Models +{ + /// The response of a GeoCatalog list operation. + internal partial class GeoCatalogListResult + { + /// + /// 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 GeoCatalog items on this page. + /// is null. + internal GeoCatalogListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The GeoCatalog items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal GeoCatalogListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GeoCatalogListResult() + { + } + + /// The GeoCatalog items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogPatch.Serialization.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogPatch.Serialization.cs new file mode 100644 index 000000000000..02ef631b3a18 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogPatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.PlanetaryComputer.Models +{ + public partial class GeoCatalogPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GeoCatalogPatch)} 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 (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GeoCatalogPatch 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(GeoCatalogPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGeoCatalogPatch(document.RootElement, options); + } + + internal static GeoCatalogPatch DeserializeGeoCatalogPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ManagedServiceIdentityUpdate identity = 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("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ManagedServiceIdentityUpdate.DeserializeManagedServiceIdentityUpdate(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GeoCatalogPatch(tags ?? new ChangeTrackingDictionary(), identity, 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, AzureResourceManagerPlanetaryComputerContext.Default); + default: + throw new FormatException($"The model {nameof(GeoCatalogPatch)} does not support writing '{options.Format}' format."); + } + } + + GeoCatalogPatch 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGeoCatalogPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GeoCatalogPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogPatch.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogPatch.cs new file mode 100644 index 000000000000..e5bd7eb7dc5a --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogPatch.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.PlanetaryComputer.Models +{ + /// The properties of a GeoCatalog that can be updated. + public partial class GeoCatalogPatch + { + /// + /// 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 GeoCatalogPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The managed service identity properties to update. + /// Keeps track of any properties unknown to the library. + internal GeoCatalogPatch(IDictionary tags, ManagedServiceIdentityUpdate identity, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The managed service identity properties to update. + public ManagedServiceIdentityUpdate Identity { get; set; } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogProperties.Serialization.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogProperties.Serialization.cs new file mode 100644 index 000000000000..d6cdbc388b95 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogProperties.Serialization.cs @@ -0,0 +1,174 @@ +// 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.PlanetaryComputer.Models +{ + public partial class GeoCatalogProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(GeoCatalogProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Tier)) + { + writer.WritePropertyName("tier"u8); + writer.WriteStringValue(Tier.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CatalogUri)) + { + writer.WritePropertyName("catalogUri"u8); + writer.WriteStringValue(CatalogUri); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) + { + writer.WritePropertyName("autoGeneratedDomainNameLabelScope"u8); + writer.WriteStringValue(AutoGeneratedDomainNameLabelScope.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GeoCatalogProperties 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(GeoCatalogProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGeoCatalogProperties(document.RootElement, options); + } + + internal static GeoCatalogProperties DeserializeGeoCatalogProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CatalogTier? tier = default; + string catalogUri = default; + ProvisioningState? provisioningState = default; + AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tier = new CatalogTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("catalogUri"u8)) + { + catalogUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("autoGeneratedDomainNameLabelScope"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoGeneratedDomainNameLabelScope = new AutoGeneratedDomainNameLabelScope(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GeoCatalogProperties(tier, catalogUri, provisioningState, autoGeneratedDomainNameLabelScope, 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, AzureResourceManagerPlanetaryComputerContext.Default); + default: + throw new FormatException($"The model {nameof(GeoCatalogProperties)} does not support writing '{options.Format}' format."); + } + } + + GeoCatalogProperties 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGeoCatalogProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GeoCatalogProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogProperties.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogProperties.cs new file mode 100644 index 000000000000..27b0c519c7fd --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/GeoCatalogProperties.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.PlanetaryComputer.Models +{ + /// The details of the Microsoft Planetary Computer Pro GeoCatalog. + public partial class GeoCatalogProperties + { + /// + /// 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 GeoCatalogProperties() + { + } + + /// Initializes a new instance of . + /// Tier of the catalog. This cannot be changed after the catalog is created. If not provided, defaults to Basic. + /// The URI of the catalog management UI. + /// The status of the last operation. + /// The scope of the auto-generated domain name label. If not provided, defaults to TenantReuse. + /// Keeps track of any properties unknown to the library. + internal GeoCatalogProperties(CatalogTier? tier, string catalogUri, ProvisioningState? provisioningState, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, IDictionary serializedAdditionalRawData) + { + Tier = tier; + CatalogUri = catalogUri; + ProvisioningState = provisioningState; + AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Tier of the catalog. This cannot be changed after the catalog is created. If not provided, defaults to Basic. + public CatalogTier? Tier { get; set; } + /// The URI of the catalog management UI. + public string CatalogUri { get; } + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + /// The scope of the auto-generated domain name label. If not provided, defaults to TenantReuse. + public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityType.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityType.cs new file mode 100644 index 000000000000..4faeefdaba2f --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityType.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.PlanetaryComputer.Models +{ + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + public readonly partial struct ManagedServiceIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedServiceIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string SystemAssignedValue = "SystemAssigned"; + private const string UserAssignedValue = "UserAssigned"; + private const string SystemAssignedUserAssignedValue = "SystemAssigned,UserAssigned"; + + /// No managed identity. + public static ManagedServiceIdentityType None { get; } = new ManagedServiceIdentityType(NoneValue); + /// System assigned managed identity. + public static ManagedServiceIdentityType SystemAssigned { get; } = new ManagedServiceIdentityType(SystemAssignedValue); + /// User assigned managed identity. + public static ManagedServiceIdentityType UserAssigned { get; } = new ManagedServiceIdentityType(UserAssignedValue); + /// System and user assigned managed identity. + public static ManagedServiceIdentityType SystemAssignedUserAssigned { get; } = new ManagedServiceIdentityType(SystemAssignedUserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedServiceIdentityType left, ManagedServiceIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedServiceIdentityType left, ManagedServiceIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ManagedServiceIdentityType(string value) => new ManagedServiceIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedServiceIdentityType other && Equals(other); + /// + public bool Equals(ManagedServiceIdentityType 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityUpdate.Serialization.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityUpdate.Serialization.cs new file mode 100644 index 000000000000..f08503c8b2d9 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityUpdate.Serialization.cs @@ -0,0 +1,160 @@ +// 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.Models; + +namespace Azure.ResourceManager.PlanetaryComputer.Models +{ + public partial class ManagedServiceIdentityUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(ManagedServiceIdentityUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"u8); + writer.WriteStartObject(); + foreach (var item in UserAssignedIdentities) + { + writer.WritePropertyName(item.Key); + JsonSerializer.Serialize(writer, 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManagedServiceIdentityUpdate 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(ManagedServiceIdentityUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedServiceIdentityUpdate(document.RootElement, options); + } + + internal static ManagedServiceIdentityUpdate DeserializeManagedServiceIdentityUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentityType? type = default; + IDictionary userAssignedIdentities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ManagedServiceIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, JsonSerializer.Deserialize(property0.Value.GetRawText())); + } + userAssignedIdentities = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedServiceIdentityUpdate(type, userAssignedIdentities ?? 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, AzureResourceManagerPlanetaryComputerContext.Default); + default: + throw new FormatException($"The model {nameof(ManagedServiceIdentityUpdate)} does not support writing '{options.Format}' format."); + } + } + + ManagedServiceIdentityUpdate 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagedServiceIdentityUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedServiceIdentityUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityUpdate.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityUpdate.cs new file mode 100644 index 000000000000..cfdd66dcd7c1 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ManagedServiceIdentityUpdate.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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.PlanetaryComputer.Models +{ + /// The template for adding optional properties. + public partial class ManagedServiceIdentityUpdate + { + /// + /// 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 ManagedServiceIdentityUpdate() + { + UserAssignedIdentities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + /// The identities assigned to this resource by the user. + /// Keeps track of any properties unknown to the library. + internal ManagedServiceIdentityUpdate(ManagedServiceIdentityType? type, IDictionary userAssignedIdentities, IDictionary serializedAdditionalRawData) + { + Type = type; + UserAssignedIdentities = userAssignedIdentities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of managed identity assigned to this resource. + public ManagedServiceIdentityType? Type { get; set; } + /// The identities assigned to this resource by the user. + public IDictionary UserAssignedIdentities { get; } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ProvisioningState.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..3082d5771f8c --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/ProvisioningState.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.PlanetaryComputer.Models +{ + /// The status of the current operation. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(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 ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Resource creation failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// The catalog is being provisioned. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// The catalog is being updated. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// The catalog is being deleted. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// The catalog request has been accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ProviderConstants.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..5056bd5a11f7 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/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.PlanetaryComputer +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/RestOperations/GeoCatalogsRestOperations.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/RestOperations/GeoCatalogsRestOperations.cs new file mode 100644 index 000000000000..9f515e77664d --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/RestOperations/GeoCatalogsRestOperations.cs @@ -0,0 +1,723 @@ +// 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.PlanetaryComputer.Models; + +namespace Azure.ResourceManager.PlanetaryComputer +{ + internal partial class GeoCatalogsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GeoCatalogsRestOperations. + /// 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 GeoCatalogsRestOperations(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 ?? "2025-02-11-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string catalogName) + { + 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.Orbital/geoCatalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string catalogName) + { + 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.Orbital/geoCatalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a GeoCatalog. + /// 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 catalog. + /// 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 catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, catalogName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GeoCatalogData.DeserializeGeoCatalogData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GeoCatalogData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a GeoCatalog. + /// 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 catalog. + /// 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 catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GeoCatalogData.DeserializeGeoCatalogData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GeoCatalogData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string catalogName, GeoCatalogData 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.Orbital/geoCatalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string catalogName, GeoCatalogData 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.Orbital/geoCatalogs/", false); + uri.AppendPath(catalogName, 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 GeoCatalog. + /// 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 catalog. + /// 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 CreateAsync(string subscriptionId, string resourceGroupName, string catalogName, GeoCatalogData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, catalogName, 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 GeoCatalog. + /// 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 catalog. + /// 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 Create(string subscriptionId, string resourceGroupName, string catalogName, GeoCatalogData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, catalogName, 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 subscriptionId, string resourceGroupName, string catalogName, GeoCatalogPatch 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.Orbital/geoCatalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string catalogName, GeoCatalogPatch patch) + { + 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.Orbital/geoCatalogs/", false); + uri.AppendPath(catalogName, 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 GeoCatalog. + /// 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 catalog. + /// 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 UpdateAsync(string subscriptionId, string resourceGroupName, string catalogName, GeoCatalogPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, catalogName, 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 GeoCatalog. + /// 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 catalog. + /// 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 Update(string subscriptionId, string resourceGroupName, string catalogName, GeoCatalogPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, catalogName, 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 subscriptionId, string resourceGroupName, string catalogName) + { + 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.Orbital/geoCatalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string catalogName) + { + 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.Orbital/geoCatalogs/", false); + uri.AppendPath(catalogName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a GeoCatalog. + /// 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 catalog. + /// 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 catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, catalogName); + 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 GeoCatalog. + /// 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 catalog. + /// 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 catalogName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(catalogName, nameof(catalogName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, catalogName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Orbital/geoCatalogs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + 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.Orbital/geoCatalogs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List GeoCatalog 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. + /// 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) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GeoCatalogListResult.DeserializeGeoCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GeoCatalog 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. + /// 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) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GeoCatalogListResult.DeserializeGeoCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Orbital/geoCatalogs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + 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.Orbital/geoCatalogs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List GeoCatalog resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GeoCatalogListResult.DeserializeGeoCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GeoCatalog resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GeoCatalogListResult.DeserializeGeoCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + 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 GeoCatalog resources by 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 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) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GeoCatalogListResult.DeserializeGeoCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GeoCatalog resources by 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 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) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GeoCatalogListResult.DeserializeGeoCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + 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 GeoCatalog resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GeoCatalogListResult.DeserializeGeoCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GeoCatalog resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GeoCatalogListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GeoCatalogListResult.DeserializeGeoCatalogListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Properties/AssemblyInfo.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..2b70fe3e4880 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.PlanetaryComputer.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namespace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("PlanetaryComputer")] diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Azure.ResourceManager.PlanetaryComputer.Tests.csproj b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Azure.ResourceManager.PlanetaryComputer.Tests.csproj new file mode 100644 index 000000000000..15a4d54cdc27 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Azure.ResourceManager.PlanetaryComputer.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_GeoCatalogCollection.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_GeoCatalogCollection.cs new file mode 100644 index 000000000000..9387103e7b6a --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_GeoCatalogCollection.cs @@ -0,0 +1,212 @@ +// 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.Models; +using Azure.ResourceManager.PlanetaryComputer.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlanetaryComputer.Samples +{ + public partial class Sample_GeoCatalogCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_GeoCatalogsCreate() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Create.json + // this example is just showing the usage of "GeoCatalog_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(); + // 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 = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation + string catalogName = "MyCatalog"; + GeoCatalogData data = new GeoCatalogData(new AzureLocation("eastus")) + { + Properties = new GeoCatalogProperties + { + Tier = CatalogTier.Basic, + AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.NoReuse, + }, + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity")] = new UserAssignedIdentity() +}, + }, + Tags = +{ +["MyTag"] = "MyValue" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); + GeoCatalogResource 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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GeoCatalogsGet() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Get.json + // this example is just showing the usage of "GeoCatalog_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 = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation + string catalogName = "MyCatalog"; + GeoCatalogResource result = await collection.GetAsync(catalogName); + + // 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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_GeoCatalogsListByResourceGroup() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_ListByResourceGroup.json + // this example is just showing the usage of "GeoCatalog_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 = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation and iterate over the result + await foreach (GeoCatalogResource 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 + GeoCatalogData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GeoCatalogsGet() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Get.json + // this example is just showing the usage of "GeoCatalog_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 = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation + string catalogName = "MyCatalog"; + bool result = await collection.ExistsAsync(catalogName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GeoCatalogsGet() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Get.json + // this example is just showing the usage of "GeoCatalog_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 = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + string resourceGroupName = "MyResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this GeoCatalogResource + GeoCatalogCollection collection = resourceGroupResource.GetGeoCatalogs(); + + // invoke the operation + string catalogName = "MyCatalog"; + NullableResponse response = await collection.GetIfExistsAsync(catalogName); + GeoCatalogResource 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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_GeoCatalogResource.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_GeoCatalogResource.cs new file mode 100644 index 000000000000..e65c70ee9e65 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_GeoCatalogResource.cs @@ -0,0 +1,122 @@ +// 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.Models; +using Azure.ResourceManager.PlanetaryComputer.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlanetaryComputer.Samples +{ + public partial class Sample_GeoCatalogResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GeoCatalogsGet() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Get.json + // this example is just showing the usage of "GeoCatalog_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 GeoCatalogResource created on azure + // for more information of creating GeoCatalogResource, please refer to the document of GeoCatalogResource + string subscriptionId = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + string resourceGroupName = "MyResourceGroup"; + string catalogName = "MyCatalog"; + ResourceIdentifier geoCatalogResourceId = GeoCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, catalogName); + GeoCatalogResource geoCatalog = client.GetGeoCatalogResource(geoCatalogResourceId); + + // invoke the operation + GeoCatalogResource result = await geoCatalog.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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_GeoCatalogsDelete() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Delete.json + // this example is just showing the usage of "GeoCatalog_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 GeoCatalogResource created on azure + // for more information of creating GeoCatalogResource, please refer to the document of GeoCatalogResource + string subscriptionId = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + string resourceGroupName = "MyResourceGroup"; + string catalogName = "MyCatalog"; + ResourceIdentifier geoCatalogResourceId = GeoCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, catalogName); + GeoCatalogResource geoCatalog = client.GetGeoCatalogResource(geoCatalogResourceId); + + // invoke the operation + await geoCatalog.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_GeoCatalogsUpdate() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_Update.json + // this example is just showing the usage of "GeoCatalog_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 GeoCatalogResource created on azure + // for more information of creating GeoCatalogResource, please refer to the document of GeoCatalogResource + string subscriptionId = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + string resourceGroupName = "MyResourceGroup"; + string catalogName = "MyCatalog"; + ResourceIdentifier geoCatalogResourceId = GeoCatalogResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, catalogName); + GeoCatalogResource geoCatalog = client.GetGeoCatalogResource(geoCatalogResourceId); + + // invoke the operation + GeoCatalogPatch patch = new GeoCatalogPatch + { + Tags = +{ +["MyTag"] = "MyValue" +}, + Identity = new ManagedServiceIdentityUpdate + { + Type = Models.ManagedServiceIdentityType.UserAssigned, + UserAssignedIdentities = +{ +["/subscriptions/cd9b6cdf-dcf0-4dca-ab19-82be07b74704/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyManagedIdentity"] = new UserAssignedIdentity() +}, + }, + }; + ArmOperation lro = await geoCatalog.UpdateAsync(WaitUntil.Completed, patch); + GeoCatalogResource 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 + GeoCatalogData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..cf10b677a84b --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// 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.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlanetaryComputer.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetGeoCatalogs_GeoCatalogsListBySubscription() + { + // Generated from example definition: 2025-02-11-preview/GeoCatalogs_ListBySubscription.json + // this example is just showing the usage of "GeoCatalog_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 = "cd9b6cdf-dcf0-4dca-ab19-82be07b74704"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (GeoCatalogResource item in subscriptionResource.GetGeoCatalogsAsync()) + { + // 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 + GeoCatalogData 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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/PlanetaryComputerManagementTestBase.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/PlanetaryComputerManagementTestBase.cs new file mode 100644 index 000000000000..cc704476bfd9 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/PlanetaryComputerManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.PlanetaryComputer.Tests +{ + public class PlanetaryComputerManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected PlanetaryComputerManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected PlanetaryComputerManagementTestBase(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/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/PlanetaryComputerManagementTestEnvironment.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/PlanetaryComputerManagementTestEnvironment.cs new file mode 100644 index 000000000000..36816598185e --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/PlanetaryComputerManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.PlanetaryComputer.Tests +{ + public class PlanetaryComputerManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Scenario/GeoCatalogCollectionTests.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Scenario/GeoCatalogCollectionTests.cs new file mode 100644 index 000000000000..fb6616c5158f --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/Scenario/GeoCatalogCollectionTests.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.PlanetaryComputer; +using Azure.ResourceManager.PlanetaryComputer.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlanetaryComputer.Tests +{ + [TestFixture(true)] + public class GeoCatalogCollectionTests : PlanetaryComputerManagementTestBase + { + // Add ExistingGeoCatalogName if you have a catalog to test against. This is for testing the GetGeoCatalog method. + private const string ExistingGeoCatalogName = ""; + // Set the ResourceGroupName and Region to match your Azure environment. + // Ensure the resource group exists in your subscription. + private const string ResourceGroupName = "shakrao-test"; + private const string Region = "uksouth"; + + public GeoCatalogCollectionTests(bool isAsync) + : base(isAsync) // <-- Forces Record mode explicitly + { + } + + [Test] + [RecordedTest] + public async Task ListGeoCatalogsInResourceGroup() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + ResourceGroupResource rg = await subscription.GetResourceGroups().GetAsync(ResourceGroupName); + GeoCatalogCollection collection = rg.GetGeoCatalogs(); + + int count = 0; + await foreach (GeoCatalogResource item in collection.GetAllAsync()) + { + TestContext.WriteLine($"GeoCatalog: {item.Data.Name}"); + count++; + } + + Assert.GreaterOrEqual(count, 0); + } + + [Test] + [RecordedTest] + public async Task GetGeoCatalog() + { + if (string.IsNullOrEmpty(ExistingGeoCatalogName)) + { + Assert.Inconclusive("No existing GeoCatalog name provided."); + return; + } + + GeoCatalogCollection collection = await GetGeoCatalogCollectionAsync(); + GeoCatalogResource catalog = await collection.GetAsync(ExistingGeoCatalogName); + + Assert.AreEqual(ExistingGeoCatalogName, catalog.Data.Name); + Assert.AreEqual(Region.ToLowerInvariant(), catalog.Data.Location.ToString().ToLowerInvariant()); + TestContext.WriteLine($"Catalog URI: {catalog.Data.Properties.CatalogUri}"); + } + + [Test] + [RecordedTest] + public async Task CreateGeoCatalog() + { + string catalogName = Recording.GenerateAssetName("testcatalog-"); + GeoCatalogCollection collection = await GetGeoCatalogCollectionAsync(); + GeoCatalogData data = new GeoCatalogData(new AzureLocation(Region)) + { + Identity = new ManagedServiceIdentity(Azure.ResourceManager.Models.ManagedServiceIdentityType.UserAssigned) + { + UserAssignedIdentities = + { + [new ResourceIdentifier($"/subscriptions/ac9a1867-7476-4346-bf8b-968370fe212c/resourceGroups/msi-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-uk-1")] = new UserAssignedIdentity() + } + }, + Properties = new GeoCatalogProperties + { + Tier = CatalogTier.Basic, + AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.TenantReuse + }, + Tags = { ["env"] = "test" } + }; + + ArmOperation operation = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); + GeoCatalogResource result = operation.Value; + + Assert.AreEqual(catalogName, result.Data.Name); + Assert.AreEqual(CatalogTier.Basic, result.Data.Properties.Tier); + TestContext.WriteLine($"Created GeoCatalog: {result.Id}"); + } + + [Test] + [RecordedTest] + public async Task UpdateGeoCatalog() + { + string catalogName = Recording.GenerateAssetName("testcatalog-"); + GeoCatalogCollection collection = await GetGeoCatalogCollectionAsync(); + + GeoCatalogData data = new GeoCatalogData(new AzureLocation(Region)) + { + Properties = new GeoCatalogProperties + { + Tier = CatalogTier.Basic, + AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.TenantReuse + }, + Tags = { ["env"] = "initial" } + }; + + ArmOperation createOp = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); + GeoCatalogResource resource = createOp.Value; + + resource.Data.Tags["env"] = "updated"; + ArmOperation updateOp = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, resource.Data); + GeoCatalogResource updated = updateOp.Value; + + Assert.AreEqual("updated", updated.Data.Tags["env"]); + TestContext.WriteLine($"Updated GeoCatalog: {updated.Id}"); + } + + [Test] + [RecordedTest] + public async Task DeleteGeoCatalog() + { + string catalogName = Recording.GenerateAssetName("testcatalog-"); + GeoCatalogCollection collection = await GetGeoCatalogCollectionAsync(); + + GeoCatalogData data = new GeoCatalogData(new AzureLocation(Region)) + { + Properties = new GeoCatalogProperties + { + Tier = CatalogTier.Basic, + AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.TenantReuse + }, + Tags = { ["env"] = "delete" } + }; + + ArmOperation createOp = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); + GeoCatalogResource resource = createOp.Value; + + ArmOperation deleteOp = await resource.DeleteAsync(WaitUntil.Completed); + Assert.IsTrue(deleteOp.HasCompleted); + + bool exists = await collection.ExistsAsync(catalogName); + Assert.IsFalse(exists); + TestContext.WriteLine($"Deleted GeoCatalog: {catalogName}"); + } + + [Test] + [RecordedTest] + public async Task ListGeoCatalogsBySubscription() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + AsyncPageable catalogs = subscription.GetGeoCatalogsAsync(); + + int count = 0; + await foreach (GeoCatalogResource item in catalogs) + { + TestContext.WriteLine($"[Subscription List] GeoCatalog: {item.Data.Name}"); + count++; + } + Assert.GreaterOrEqual(count, 0); + } + [Test] + [RecordedTest] + public async Task CreateUpdateDeleteGeoCatalog() + { + Console.WriteLine($"[MODE] Test is running in: {TestEnvironment.Mode}"); + + string catalogName = Recording.GenerateAssetName("testcatalog-"); + GeoCatalogCollection collection = await GetGeoCatalogCollectionAsync(); + + // Step 1: Create + GeoCatalogData data = new GeoCatalogData(new AzureLocation(Region)) + { + Properties = new GeoCatalogProperties + { + Tier = CatalogTier.Basic, + AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.TenantReuse + }, + Tags = { ["env"] = "initial" } + }; + + ArmOperation createOp = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, data); + GeoCatalogResource resource = createOp.Value; + + Assert.AreEqual("initial", resource.Data.Tags["env"]); + TestContext.WriteLine($"✅ Created GeoCatalog: {resource.Id}"); + + // Step 2: Update + resource.Data.Tags["env"] = "updated"; + ArmOperation updateOp = await collection.CreateOrUpdateAsync(WaitUntil.Completed, catalogName, resource.Data); + GeoCatalogResource updated = updateOp.Value; + + Assert.AreEqual("updated", updated.Data.Tags["env"]); + TestContext.WriteLine($"🔄 Updated GeoCatalog: {updated.Id}"); + + // Step 3: Delete + ArmOperation deleteOp = await updated.DeleteAsync(WaitUntil.Completed); + Assert.IsTrue(deleteOp.HasCompleted); + + bool exists = await collection.ExistsAsync(catalogName); + Assert.IsFalse(exists); + TestContext.WriteLine($"❌ Deleted GeoCatalog: {catalogName}"); + } + + private async Task GetGeoCatalogCollectionAsync() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + ResourceGroupResource rg = await subscription.GetResourceGroups().GetAsync(ResourceGroupName); + return rg.GetGeoCatalogs(); + } + } +} diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/test-resources.json b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/test-resources.json new file mode 100644 index 000000000000..ede357a93212 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/test-resources.json @@ -0,0 +1,7 @@ +{ + "record": true, + "variables": { + "AZURE_SUBSCRIPTION_ID": "00000000-0000-0000-0000-000000000000", + "AZURE_RESOURCE_GROUP": "test" + } + } diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/test.runsettings b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/test.runsettings new file mode 100644 index 000000000000..4874433e61e2 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tests/test.runsettings @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tsp-location.yaml b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tsp-location.yaml new file mode 100644 index 000000000000..30ff609c8758 --- /dev/null +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/orbitalplanetarycomputer/Orbital.Management +commit: 558870b2064c76be7afdf0c744ffb502a92454c1 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/planetarycomputer/ci.mgmt.yml b/sdk/planetarycomputer/ci.mgmt.yml new file mode 100644 index 000000000000..93b8b6149a83 --- /dev/null +++ b/sdk/planetarycomputer/ci.mgmt.yml @@ -0,0 +1,30 @@ +# 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/PlanetaryComputer/ci.mgmt.yml + - sdk/PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer/ + +/ci.mgmt.yml + - sdk/PlanetaryComputer +/Azure.ResourceManager.PlanetaryComputer +/ + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: PlanetaryComputer + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.PlanetaryComputer + safeName: AzureResourceManagerPlanetaryComputer diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Azure.ResourceManager.PlaywrightTesting.sln b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Azure.ResourceManager.PlaywrightTesting.sln index d228073bf651..5a624bf0b30f 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Azure.ResourceManager.PlaywrightTesting.sln +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Azure.ResourceManager.PlaywrightTesting.sln @@ -7,8 +7,6 @@ Project("{372C84B3-CF2C-4B7F-A895-20CE01F978C9}") = "Azure.ResourceManager.Playw EndProject Project("{372C84B3-CF2C-4B7F-A895-20CE01F978C9}") = "Azure.ResourceManager.PlaywrightTesting.Tests", "tests\Azure.ResourceManager.PlaywrightTesting.Tests.csproj", "{5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}" EndProject -Project("{372C84B3-CF2C-4B7F-A895-20CE01F978C9}") = "Azure.ResourceManager.PlaywrightTesting.Samples", "samples\Azure.ResourceManager.PlaywrightTesting.Samples.csproj", "{8F049932-7F19-4BAA-95DA-C0E265E88842}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Azure.ResourceManager.PlaywrightTesting.Samples.csproj b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Azure.ResourceManager.PlaywrightTesting.Samples.csproj deleted file mode 100644 index 0c1470ef1936..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Azure.ResourceManager.PlaywrightTesting.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs similarity index 100% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs similarity index 100% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs similarity index 100% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs similarity index 100% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs similarity index 100% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs similarity index 100% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/Azure.ResourceManager.PortalServicesCopilot.sln b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/Azure.ResourceManager.PortalServicesCopilot.sln index a8496c95fcb1..423ba322ee43 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/Azure.ResourceManager.PortalServicesCopilot.sln +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/Azure.ResourceManager.PortalServicesCopilot.sln @@ -7,8 +7,6 @@ Project("{443E3AD3-1ED9-44A4-8C6E-901365FF1966}") = "Azure.ResourceManager.Porta EndProject Project("{443E3AD3-1ED9-44A4-8C6E-901365FF1966}") = "Azure.ResourceManager.PortalServicesCopilot.Tests", "tests\Azure.ResourceManager.PortalServicesCopilot.Tests.csproj", "{381B174E-8E5B-4887-B8C1-BF4DEBEAC3A6}" EndProject -Project("{443E3AD3-1ED9-44A4-8C6E-901365FF1966}") = "Azure.ResourceManager.PortalServicesCopilot.Samples", "samples\Azure.ResourceManager.PortalServicesCopilot.Samples.csproj", "{2D08F5E7-7672-4E0E-A2EF-8376B9A7ED7B}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/samples/Azure.ResourceManager.PortalServicesCopilot.Samples.csproj b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/samples/Azure.ResourceManager.PortalServicesCopilot.Samples.csproj deleted file mode 100644 index af30bccd861e..000000000000 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/samples/Azure.ResourceManager.PortalServicesCopilot.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/samples/Generated/Samples/Sample_PortalServicesCopilotSettingResource.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tests/Generated/Samples/Sample_PortalServicesCopilotSettingResource.cs similarity index 100% rename from sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/samples/Generated/Samples/Sample_PortalServicesCopilotSettingResource.cs rename to sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tests/Generated/Samples/Sample_PortalServicesCopilotSettingResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/CHANGELOG.md b/sdk/postgresql/Azure.ResourceManager.PostgreSql/CHANGELOG.md index 0fe144d32a09..e7890d0b5a07 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/CHANGELOG.md +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.4.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,16 @@ ### Other Changes +## 1.3.0 (2025-06-25) + +### Features Added + +- Introduced `AzureResourceManagerPostgreSqlContext` to make this library AOT compatible. + +### Bugs Fixed + +- Fixed some deprecated properties that are incorrectly implemented in the previous version. + ## 1.2.0 (2024-11-05) This release uses GA api version 2024-08-01 for PostgreSQL flexible server. diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/ApiCompatBaseline.txt b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/ApiCompatBaseline.txt deleted file mode 100644 index 6f3fa6833116..000000000000 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/ApiCompatBaseline.txt +++ /dev/null @@ -1,3 +0,0 @@ -# The attribute is in shared source which is included and compiled into the binary, so there is no compatibility concern on it. -CannotChangeAttribute : Attribute 'Azure.ResourceManager.PostgreSql.FlexibleServers.WirePathAttribute' on 'Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerStorageCapability.StorageSizeInMB' changed from '[WirePathAttribute("storageSizeMB")]' in the contract to '[WirePathAttribute("storageSizeMb")]' in the implementation. -CannotChangeAttribute : Attribute 'Azure.ResourceManager.PostgreSql.FlexibleServers.WirePathAttribute' on 'Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerStorageEditionCapability.SupportedStorageCapabilities' changed from '[WirePathAttribute("supportedStorageMB")]' in the contract to '[WirePathAttribute("supportedStorageMb")]' in the implementation. \ No newline at end of file diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj index ef5479d008c5..ddaf70ed818e 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj @@ -1,8 +1,8 @@ - 1.3.0-beta.1 + 1.4.0-beta.1 - 1.2.0 + 1.3.0 Azure.ResourceManager.PostgreSql Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.DBforPostgreSQL. azure;management;arm;resource manager;postgresql diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Custom/Models/DbMigrationStatus.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Custom/Models/DbMigrationStatus.cs index 6cbb4d692424..fe8d9773246b 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Custom/Models/DbMigrationStatus.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Custom/Models/DbMigrationStatus.cs @@ -13,18 +13,18 @@ public partial class DbMigrationStatus /// Number of tables queued for the migration of a DB. [EditorBrowsable(EditorBrowsableState.Never)] [WirePath("fullLoadQueuedTables")] - public int? NumFullLoadQueuedTables { get; } + public int? NumFullLoadQueuedTables => FullLoadQueuedTables; /// Number of tables errored out during the migration of a DB. [EditorBrowsable(EditorBrowsableState.Never)] [WirePath("fullLoadErroredTables")] - public int? NumFullLoadErroredTables { get; } + public int? NumFullLoadErroredTables => FullLoadErroredTables; /// Number of tables loading during the migration of a DB. [EditorBrowsable(EditorBrowsableState.Never)] [WirePath("fullLoadLoadingTables")] - public int? NumFullLoadLoadingTables { get; } + public int? NumFullLoadLoadingTables => FullLoadLoadingTables; /// Number of tables loaded during the migration of a DB. [EditorBrowsable(EditorBrowsableState.Never)] [WirePath("fullLoadCompletedTables")] - public int? NumFullLoadCompletedTables { get; } + public int? NumFullLoadCompletedTables => FullLoadCompletedTables; } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlConfigurationCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlConfigurationCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlConfigurationCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlConfigurationCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlConfigurationResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlConfigurationResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlConfigurationResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlConfigurationResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlDatabaseCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlDatabaseCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlDatabaseCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlDatabaseCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlDatabaseResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlDatabaseResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlDatabaseResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlDatabaseResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlFirewallRuleCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlFirewallRuleCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlFirewallRuleCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlFirewallRuleCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlFirewallRuleResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlFirewallRuleResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlFirewallRuleResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlFirewallRuleResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlPrivateEndpointConnectionCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlPrivateEndpointConnectionCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlPrivateEndpointConnectionCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlPrivateEndpointConnectionCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlPrivateEndpointConnectionResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlPrivateEndpointConnectionResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlPrivateEndpointConnectionResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlPrivateEndpointConnectionResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlPrivateLinkResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlPrivateLinkResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlPrivateLinkResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlPrivateLinkResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlPrivateLinkResourceCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlPrivateLinkResourceCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlPrivateLinkResourceCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlPrivateLinkResourceCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerAdministratorResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerAdministratorResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerAdministratorResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerAdministratorResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerKeyCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerKeyCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerKeyCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerKeyCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerKeyResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerKeyResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerKeyResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerKeyResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerSecurityAlertPolicyCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerSecurityAlertPolicyCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerSecurityAlertPolicyCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerSecurityAlertPolicyCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerSecurityAlertPolicyResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerSecurityAlertPolicyResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlServerSecurityAlertPolicyResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlServerSecurityAlertPolicyResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlVirtualNetworkRuleCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlVirtualNetworkRuleCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlVirtualNetworkRuleCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlVirtualNetworkRuleCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlVirtualNetworkRuleResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlVirtualNetworkRuleResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_PostgreSqlVirtualNetworkRuleResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_PostgreSqlVirtualNetworkRuleResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSql/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerActiveDirectoryAdministratorCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerActiveDirectoryAdministratorCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerActiveDirectoryAdministratorCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerActiveDirectoryAdministratorCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerActiveDirectoryAdministratorResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerActiveDirectoryAdministratorResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerActiveDirectoryAdministratorResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerActiveDirectoryAdministratorResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerBackupCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerBackupCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerBackupCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerBackupCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerBackupResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerBackupResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerBackupResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerBackupResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerConfigurationCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerConfigurationCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerConfigurationCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerConfigurationCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerConfigurationResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerConfigurationResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerConfigurationResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerConfigurationResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerDatabaseCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerDatabaseCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerDatabaseCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerDatabaseCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerDatabaseResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerDatabaseResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerDatabaseResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerDatabaseResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerFirewallRuleCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerFirewallRuleCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerFirewallRuleCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerFirewallRuleCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerFirewallRuleResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerFirewallRuleResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerFirewallRuleResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerFirewallRuleResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServerResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServerResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateEndpointConnectionCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateEndpointConnectionCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateEndpointConnectionCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateEndpointConnectionCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateEndpointConnectionResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateEndpointConnectionResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateEndpointConnectionResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateEndpointConnectionResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateLinkResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateLinkResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateLinkResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateLinkResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateLinkResourceCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateLinkResourceCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateLinkResourceCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlFlexibleServersPrivateLinkResourceCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlLtrServerBackupOperationCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlLtrServerBackupOperationCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlLtrServerBackupOperationCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlLtrServerBackupOperationCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlLtrServerBackupOperationResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlLtrServerBackupOperationResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlLtrServerBackupOperationResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlLtrServerBackupOperationResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlMigrationCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlMigrationCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlMigrationCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlMigrationCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlMigrationResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlMigrationResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_PostgreSqlMigrationResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_PostgreSqlMigrationResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_ServerThreatProtectionSettingsModelCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_ServerThreatProtectionSettingsModelCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_ServerThreatProtectionSettingsModelCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_ServerThreatProtectionSettingsModelCollection.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_ServerThreatProtectionSettingsModelResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_ServerThreatProtectionSettingsModelResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_ServerThreatProtectionSettingsModelResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_ServerThreatProtectionSettingsModelResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_TenantResourceExtensions.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_TenantResourceExtensions.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_TenantResourceExtensions.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_VirtualEndpointResource.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_VirtualEndpointResource.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_VirtualEndpointResource.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_VirtualEndpointResource.cs diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_VirtualEndpointResourceCollection.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_VirtualEndpointResourceCollection.cs similarity index 100% rename from sdk/postgresql/Azure.ResourceManager.PostgreSql/samples/Generated/Samples/Sample_VirtualEndpointResourceCollection.cs rename to sdk/postgresql/Azure.ResourceManager.PostgreSql/tests/PostgreSqlFlexibleServers/Generated/Samples/Sample_VirtualEndpointResourceCollection.cs diff --git a/sdk/provisioning/Azure.Provisioning.AppService/Changelog.md b/sdk/provisioning/Azure.Provisioning.AppService/Changelog.md index 145329ad4634..c2c25b701ecc 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/Changelog.md +++ b/sdk/provisioning/Azure.Provisioning.AppService/Changelog.md @@ -1,14 +1,17 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0 (2025-06-26) ### Features Added -### Breaking Changes +- Bump api-version to latest. +- Added `SiteAuthSettingsV2` resource and its related models. + +## 1.1.1 (2025-06-25) ### Bugs Fixed -### Other Changes +- Hide some properties that are incorrectly generated in previous versions. ## 1.1.0 (2025-06-16) diff --git a/sdk/provisioning/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.net8.0.cs b/sdk/provisioning/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.net8.0.cs index 5a4b6826d438..2df274def2fc 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.net8.0.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.net8.0.cs @@ -103,6 +103,71 @@ public AppLogsConfiguration() { } public Azure.Provisioning.AppService.LogAnalyticsConfiguration LogAnalyticsConfiguration { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class AppRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppRegistration() { } + public Azure.Provisioning.BicepValue AppId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue AppSecretSettingName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadAllowedPrincipals : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadAllowedPrincipals() { } + public Azure.Provisioning.BicepList Groups { get { throw null; } set { } } + public Azure.Provisioning.BicepList Identities { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadLoginFlow : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadLoginFlow() { } + public Azure.Provisioning.BicepValue IsWwwAuthenticateDisabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginParameters { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadProvider() { } + public Azure.Provisioning.BicepValue IsAutoProvisioned { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadLoginFlow Login { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadRegistration Registration { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadValidation Validation { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadRegistration() { } + public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretCertificateIssuer { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretCertificateSubjectAlternativeName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretCertificateThumbprintString { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue OpenIdIssuer { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadValidation : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadValidation() { } + public Azure.Provisioning.BicepList AllowedAudiences { get { throw null; } set { } } + public Azure.Provisioning.AppService.DefaultAuthorizationPolicy DefaultAuthorizationPolicy { get { throw null; } set { } } + public Azure.Provisioning.AppService.JwtClaimChecks JwtClaimChecks { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAppleProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAppleProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAppleRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAppleRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAppleRegistration() { } + public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class AppServiceArmPlan : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceArmPlan() { } @@ -433,12 +498,46 @@ public enum AppServiceEnvironmentUpgradePreference Late = 2, Manual = 3, } + public partial class AppServiceFacebookProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceFacebookProvider() { } + public Azure.Provisioning.BicepValue GraphApiVersion { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceForwardProxy : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceForwardProxy() { } + public Azure.Provisioning.BicepValue Convention { get { throw null; } set { } } + public Azure.Provisioning.BicepValue CustomHostHeaderName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue CustomProtoHeaderName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum AppServiceFtpsState { AllAllowed = 0, FtpsOnly = 1, Disabled = 2, } + public partial class AppServiceGitHubProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceGitHubProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.ClientRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceGoogleProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceGoogleProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.ClientRegistration Registration { get { throw null; } set { } } + public Azure.Provisioning.BicepList ValidationAllowedAudiences { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class AppServiceHostName : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceHostName() { } @@ -467,6 +566,28 @@ public AppServiceHttpLogsConfig() { } public Azure.Provisioning.AppService.FileSystemHttpLogsConfig FileSystem { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class AppServiceHttpSettings : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceHttpSettings() { } + public Azure.Provisioning.AppService.AppServiceForwardProxy ForwardProxy { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsHttpsRequired { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RoutesApiPrefix { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceIdentityProviders : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceIdentityProviders() { } + public Azure.Provisioning.AppService.AppServiceAppleProvider Apple { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadProvider AzureActiveDirectory { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceStaticWebAppsProvider AzureStaticWebApps { get { throw null; } set { } } + public Azure.Provisioning.BicepDictionary CustomOpenIdConnectProviders { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceFacebookProvider Facebook { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceGitHubProvider GitHub { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceGoogleProvider Google { get { throw null; } set { } } + public Azure.Provisioning.AppService.LegacyMicrosoftAccount LegacyMicrosoftAccount { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceTwitterProvider Twitter { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum AppServiceIPFilterTag { Default = 0, @@ -510,6 +631,7 @@ public partial class AppServicePlan : Azure.Provisioning.Primitives.Provisionabl public Azure.Provisioning.BicepValue GeoRegion { get { throw null; } } public Azure.Provisioning.AppService.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } + public Azure.Provisioning.BicepValue IsAsyncScalingEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsElasticScaleEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsHyperV { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsPerSiteScaling { get { throw null; } set { } } @@ -671,6 +793,13 @@ public static partial class ResourceVersions public static readonly string V2024_11_01; } } + public partial class AppServiceStaticWebAppsProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceStaticWebAppsProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RegistrationClientId { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class AppServiceStorageAccessInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceStorageAccessInfo() { } @@ -756,6 +885,22 @@ public enum AppServiceTlsCipherSuite [System.Runtime.Serialization.DataMemberAttribute(Name="TLS_RSA_WITH_AES_128_CBC_SHA")] TlsRsaWithAes128CbcSha = 16, } + public partial class AppServiceTokenStore : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceTokenStore() { } + public Azure.Provisioning.BicepValue AzureBlobStorageSasUrlSettingName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue FileSystemDirectory { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue TokenRefreshExtensionHours { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceTwitterProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceTwitterProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.AppService.TwitterRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum AppServiceUsageState { Normal = 0, @@ -879,6 +1024,14 @@ public AseV3NetworkingConfigurationData() { } public Azure.Provisioning.BicepList WindowsOutboundIPAddresses { get { throw null; } } protected override void DefineProvisionableProperties() { } } + public partial class AuthPlatform : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AuthPlatform() { } + public Azure.Provisioning.BicepValue ConfigFilePath { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RuntimeVersion { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum AutoGeneratedDomainNameLabelScope { TenantReuse = 0, @@ -958,6 +1111,17 @@ public enum ClientCertMode Optional = 1, OptionalInteractiveUser = 2, } + public enum ClientCredentialMethod + { + ClientSecretPost = 0, + } + public partial class ClientRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public ClientRegistration() { } + public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class CloningInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CloningInfo() { } @@ -1017,6 +1181,11 @@ public ContainerAppsConfiguration() { } public Azure.Provisioning.BicepValue PlatformReservedDnsIP { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public enum CookieExpirationConvention + { + FixedTime = 0, + IdentityProviderDerived = 1, + } public partial class CustomDnsSuffixConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { public CustomDnsSuffixConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } @@ -1104,6 +1273,21 @@ public enum CustomHostNameDnsRecordType CName = 0, A = 1, } + public partial class CustomOpenIdConnectProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public CustomOpenIdConnectProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.AppService.OpenIdConnectLogin Login { get { throw null; } set { } } + public Azure.Provisioning.AppService.OpenIdConnectRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class DefaultAuthorizationPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public DefaultAuthorizationPolicy() { } + public Azure.Provisioning.BicepList AllowedApplications { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadAllowedPrincipals AllowedPrincipals { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum DomainNotRenewableReason { RegistrationStatusNotSupportedForRenewal = 0, @@ -1166,6 +1350,12 @@ public FileSystemHttpLogsConfig() { } public Azure.Provisioning.BicepValue RetentionInMb { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public enum ForwardProxyConvention + { + NoProxy = 0, + Standard = 1, + Custom = 2, + } public enum FrontEndServiceType { NodePort = 0, @@ -1175,6 +1365,7 @@ public partial class FunctionAppAlwaysReadyConfig : Azure.Provisioning.Primitive { public FunctionAppAlwaysReadyConfig() { } public Azure.Provisioning.BicepValue AlwaysReadyInstanceCount { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue InstanceCount { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } @@ -1223,8 +1414,11 @@ public FunctionAppScaleAndConcurrency() { } public Azure.Provisioning.BicepValue ConcurrentHttpPerInstanceConcurrency { get { throw null; } set { } } public Azure.Provisioning.BicepValue FunctionAppInstanceMemoryMB { get { throw null; } set { } } public Azure.Provisioning.BicepValue FunctionAppMaximumInstanceCount { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue HttpPerInstanceConcurrency { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue InstanceMemoryMB { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue MaximumInstanceCount { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } @@ -1280,6 +1474,15 @@ public GitHubActionContainerConfiguration() { } public Azure.Provisioning.BicepValue Username { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class GlobalValidation : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public GlobalValidation() { } + public Azure.Provisioning.BicepList ExcludedPaths { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsAuthenticationRequired { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RedirectToProvider { get { throw null; } set { } } + public Azure.Provisioning.BicepValue UnauthenticatedClientAction { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class HostingEnvironmentMultiRolePool : Azure.Provisioning.Primitives.ProvisionableResource { public HostingEnvironmentMultiRolePool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } @@ -1473,6 +1676,13 @@ public HttpRequestHandlerMapping() { } public Azure.Provisioning.BicepValue ScriptProcessor { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class JwtClaimChecks : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public JwtClaimChecks() { } + public Azure.Provisioning.BicepList AllowedClientApplications { get { throw null; } set { } } + public Azure.Provisioning.BicepList AllowedGroups { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum KeyVaultSecretStatus { Unknown = 0, @@ -1537,6 +1747,15 @@ public enum KubeEnvironmentProvisioningState UpgradeRequested = 8, UpgradeFailed = 9, } + public partial class LegacyMicrosoftAccount : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public LegacyMicrosoftAccount() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.ClientRegistration Registration { get { throw null; } set { } } + public Azure.Provisioning.BicepList ValidationAllowedAudiences { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum LoadBalancingMode { None = 0, @@ -1552,6 +1771,13 @@ public LogAnalyticsConfiguration() { } public Azure.Provisioning.BicepValue SharedKey { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class LoginFlowNonceSettings : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public LoginFlowNonceSettings() { } + public Azure.Provisioning.BicepValue NonceExpirationInterval { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ValidateNonce { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class LogsSiteConfig : Azure.Provisioning.Primitives.ProvisionableResource { public LogsSiteConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } @@ -1670,6 +1896,48 @@ public enum MSDeployProvisioningState [System.Runtime.Serialization.DataMemberAttribute(Name="canceled")] Canceled = 4, } + public partial class OpenIdConnectClientCredential : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OpenIdConnectClientCredential() { } + public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Method { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class OpenIdConnectConfig : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OpenIdConnectConfig() { } + public Azure.Provisioning.BicepValue AuthorizationEndpoint { get { throw null; } set { } } + public Azure.Provisioning.BicepValue CertificationUri { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Issuer { get { throw null; } set { } } + public Azure.Provisioning.BicepValue TokenEndpoint { get { throw null; } set { } } + public Azure.Provisioning.BicepValue WellKnownOpenIdConfiguration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class OpenIdConnectLogin : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OpenIdConnectLogin() { } + public Azure.Provisioning.BicepValue NameClaimType { get { throw null; } set { } } + public Azure.Provisioning.BicepList Scopes { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class OpenIdConnectRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OpenIdConnectRegistration() { } + public Azure.Provisioning.AppService.OpenIdConnectClientCredential ClientCredential { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } + public Azure.Provisioning.AppService.OpenIdConnectConfig OpenIdConnectConfiguration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class OutboundVnetRouting : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OutboundVnetRouting() { } + public Azure.Provisioning.BicepValue IsAllTrafficEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsApplicationTrafficEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsBackupRestoreTrafficEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsContentShareTrafficEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsImagePullTrafficEnabled { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class PrivateAccessSubnet : Azure.Provisioning.Primitives.ProvisionableConstruct { public PrivateAccessSubnet() { } @@ -1948,6 +2216,59 @@ public enum ScmType [System.Runtime.Serialization.DataMemberAttribute(Name="VSTSRM")] Vstsrm = 13, } + public partial class SiteAuthSettingsV2 : Azure.Provisioning.Primitives.ProvisionableResource + { + public SiteAuthSettingsV2(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public Azure.Provisioning.AppService.GlobalValidation GlobalValidation { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceHttpSettings HttpSettings { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Id { get { throw null; } } + public Azure.Provisioning.AppService.AppServiceIdentityProviders IdentityProviders { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } + public Azure.Provisioning.AppService.WebAppLoginInfo Login { get { throw null; } set { } } + public Azure.Provisioning.AppService.AuthPlatform Platform { get { throw null; } set { } } + public Azure.Provisioning.Resources.SystemData SystemData { get { throw null; } } + protected override void DefineProvisionableProperties() { } + public static Azure.Provisioning.AppService.SiteAuthSettingsV2 FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } + } + public partial class SiteCertificate : Azure.Provisioning.Primitives.ProvisionableResource + { + public SiteCertificate(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 { } } + public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } } + public Azure.Provisioning.BicepValue FriendlyName { get { throw null; } } + public Azure.Provisioning.AppService.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } } + public Azure.Provisioning.BicepList HostNames { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Id { get { throw null; } } + public Azure.Provisioning.BicepValue IssueOn { get { throw null; } } + public Azure.Provisioning.BicepValue Issuer { get { throw null; } } + public Azure.Provisioning.BicepValue IsValid { get { throw null; } } + public Azure.Provisioning.BicepValue KeyVaultId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue KeyVaultSecretName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue KeyVaultSecretStatus { get { throw null; } } + public Azure.Provisioning.BicepValue Kind { 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.AppService.WebSite? Parent { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Password { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PfxBlob { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PublicKeyHash { get { throw null; } } + public Azure.Provisioning.BicepValue SelfLink { get { throw null; } } + public Azure.Provisioning.BicepValue ServerFarmId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue SiteName { get { throw null; } } + public Azure.Provisioning.BicepValue SubjectName { get { throw null; } } + public Azure.Provisioning.Resources.SystemData SystemData { get { throw null; } } + public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } + public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } } + protected override void DefineProvisionableProperties() { } + public static Azure.Provisioning.AppService.SiteCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } + public static partial class ResourceVersions + { + public static readonly string V2024_11_01; + } + } public partial class SiteConfigProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public SiteConfigProperties() { } @@ -1970,6 +2291,7 @@ public SiteConfigProperties() { } public Azure.Provisioning.BicepValue FunctionAppScaleLimit { get { throw null; } set { } } public Azure.Provisioning.BicepList HandlerMappings { get { throw null; } set { } } public Azure.Provisioning.BicepValue HealthCheckPath { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Http20ProxyFlag { get { throw null; } set { } } public Azure.Provisioning.BicepList IPSecurityRestrictions { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsAlwaysOn { get { throw null; } set { } } @@ -2033,6 +2355,7 @@ public partial class SiteContainer : Azure.Provisioning.Primitives.Provisionable public Azure.Provisioning.BicepList EnvironmentVariables { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Image { get { throw null; } set { } } + public Azure.Provisioning.BicepValue InheritAppSettingsAndConnectionStrings { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsMain { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue LastModifiedOn { get { throw null; } } @@ -2595,6 +2918,45 @@ public static partial class ResourceVersions public static readonly string V2024_11_01; } } + public partial class SiteSlotCertificate : Azure.Provisioning.Primitives.ProvisionableResource + { + public SiteSlotCertificate(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 { } } + public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } } + public Azure.Provisioning.BicepValue FriendlyName { get { throw null; } } + public Azure.Provisioning.AppService.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } } + public Azure.Provisioning.BicepList HostNames { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Id { get { throw null; } } + public Azure.Provisioning.BicepValue IssueOn { get { throw null; } } + public Azure.Provisioning.BicepValue Issuer { get { throw null; } } + public Azure.Provisioning.BicepValue IsValid { get { throw null; } } + public Azure.Provisioning.BicepValue KeyVaultId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue KeyVaultSecretName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue KeyVaultSecretStatus { get { throw null; } } + public Azure.Provisioning.BicepValue Kind { 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.AppService.WebSiteSlot? Parent { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Password { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PfxBlob { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PublicKeyHash { get { throw null; } } + public Azure.Provisioning.BicepValue SelfLink { get { throw null; } } + public Azure.Provisioning.BicepValue ServerFarmId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue SiteName { get { throw null; } } + public Azure.Provisioning.BicepValue SubjectName { get { throw null; } } + public Azure.Provisioning.Resources.SystemData SystemData { get { throw null; } } + public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } + public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } } + protected override void DefineProvisionableProperties() { } + public static Azure.Provisioning.AppService.SiteSlotCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } + public static partial class ResourceVersions + { + public static readonly string V2024_11_01; + } + } public partial class SiteSlotDeployment : Azure.Provisioning.Primitives.ProvisionableResource { public SiteSlotDeployment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } @@ -3000,6 +3362,7 @@ public partial class SiteSlotSiteContainer : Azure.Provisioning.Primitives.Provi public Azure.Provisioning.BicepList EnvironmentVariables { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Image { get { throw null; } set { } } + public Azure.Provisioning.BicepValue InheritAppSettingsAndConnectionStrings { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsMain { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue LastModifiedOn { get { throw null; } } @@ -3749,6 +4112,20 @@ public StatusCodesRangeBasedTrigger() { } public Azure.Provisioning.BicepValue TimeInterval { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class TwitterRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public TwitterRegistration() { } + public Azure.Provisioning.BicepValue ConsumerKey { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ConsumerSecretSettingName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public enum UnauthenticatedClientActionV2 + { + RedirectToLoginPage = 0, + AllowAnonymous = 1, + Return401 = 2, + Return403 = 3, + } public partial class VirtualApplication : Azure.Provisioning.Primitives.ProvisionableConstruct { public VirtualApplication() { } @@ -3765,6 +4142,13 @@ public VirtualDirectory() { } public Azure.Provisioning.BicepValue VirtualPath { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class WebAppCookieExpiration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public WebAppCookieExpiration() { } + public Azure.Provisioning.BicepValue Convention { get { throw null; } set { } } + public Azure.Provisioning.BicepValue TimeToExpiration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class WebAppEnvironmentVariable : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebAppEnvironmentVariable() { } @@ -3772,6 +4156,17 @@ public WebAppEnvironmentVariable() { } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class WebAppLoginInfo : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public WebAppLoginInfo() { } + public Azure.Provisioning.BicepList AllowedExternalRedirectUrls { get { throw null; } set { } } + public Azure.Provisioning.AppService.WebAppCookieExpiration CookieExpiration { get { throw null; } set { } } + public Azure.Provisioning.AppService.LoginFlowNonceSettings Nonce { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PreserveUrlFragmentsForLogins { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RoutesLogoutEndpoint { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceTokenStore TokenStore { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum WebAppLogLevel { Off = 0, @@ -3819,6 +4214,8 @@ public partial class WebSite : Azure.Provisioning.Primitives.ProvisionableResour public Azure.Provisioning.BicepValue InProgressOperationId { get { throw null; } } public Azure.Provisioning.BicepValue IPMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsClientAffinityEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsClientAffinityPartitioningEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsClientAffinityProxyEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsClientCertEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsDefaultContainer { get { throw null; } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -3828,6 +4225,7 @@ public partial class WebSite : Azure.Provisioning.Primitives.ProvisionableResour public Azure.Provisioning.BicepValue IsHyperV { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsReserved { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsScmSiteAlsoStopped { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsSshEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsStorageAccountRequired { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsVnetBackupRestoreEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsVnetContentShareEnabled { get { throw null; } set { } } @@ -3842,6 +4240,7 @@ public partial class WebSite : Azure.Provisioning.Primitives.ProvisionableResour public Azure.Provisioning.BicepValue MaxNumberOfWorkers { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue OutboundIPAddresses { get { throw null; } } + public Azure.Provisioning.AppService.OutboundVnetRouting OutboundVnetRouting { get { throw null; } set { } } public Azure.Provisioning.BicepValue PossibleOutboundIPAddresses { get { throw null; } } public Azure.Provisioning.BicepValue PublicNetworkAccess { get { throw null; } set { } } public Azure.Provisioning.BicepValue RedundancyMode { get { throw null; } set { } } @@ -3928,6 +4327,7 @@ public partial class WebSiteConfig : Azure.Provisioning.Primitives.Provisionable public Azure.Provisioning.BicepValue FunctionAppScaleLimit { get { throw null; } set { } } public Azure.Provisioning.BicepList HandlerMappings { get { throw null; } set { } } public Azure.Provisioning.BicepValue HealthCheckPath { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Http20ProxyFlag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPSecurityRestrictions { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } @@ -4307,6 +4707,8 @@ public partial class WebSiteSlot : Azure.Provisioning.Primitives.ProvisionableRe public Azure.Provisioning.BicepValue InProgressOperationId { get { throw null; } } public Azure.Provisioning.BicepValue IPMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsClientAffinityEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsClientAffinityPartitioningEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsClientAffinityProxyEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsClientCertEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsDefaultContainer { get { throw null; } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -4316,6 +4718,7 @@ public partial class WebSiteSlot : Azure.Provisioning.Primitives.ProvisionableRe public Azure.Provisioning.BicepValue IsHyperV { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsReserved { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsScmSiteAlsoStopped { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsSshEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsStorageAccountRequired { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsVnetBackupRestoreEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsVnetContentShareEnabled { get { throw null; } set { } } @@ -4330,6 +4733,7 @@ public partial class WebSiteSlot : Azure.Provisioning.Primitives.ProvisionableRe public Azure.Provisioning.BicepValue MaxNumberOfWorkers { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue OutboundIPAddresses { get { throw null; } } + public Azure.Provisioning.AppService.OutboundVnetRouting OutboundVnetRouting { get { throw null; } set { } } public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue PossibleOutboundIPAddresses { get { throw null; } } public Azure.Provisioning.BicepValue PublicNetworkAccess { get { throw null; } set { } } @@ -4411,6 +4815,7 @@ public partial class WebSiteSlotConfig : Azure.Provisioning.Primitives.Provision public Azure.Provisioning.BicepValue FunctionAppScaleLimit { get { throw null; } set { } } public Azure.Provisioning.BicepList HandlerMappings { get { throw null; } set { } } public Azure.Provisioning.BicepValue HealthCheckPath { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Http20ProxyFlag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPSecurityRestrictions { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } 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 5a4b6826d438..2df274def2fc 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 @@ -103,6 +103,71 @@ public AppLogsConfiguration() { } public Azure.Provisioning.AppService.LogAnalyticsConfiguration LogAnalyticsConfiguration { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class AppRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppRegistration() { } + public Azure.Provisioning.BicepValue AppId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue AppSecretSettingName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadAllowedPrincipals : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadAllowedPrincipals() { } + public Azure.Provisioning.BicepList Groups { get { throw null; } set { } } + public Azure.Provisioning.BicepList Identities { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadLoginFlow : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadLoginFlow() { } + public Azure.Provisioning.BicepValue IsWwwAuthenticateDisabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginParameters { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadProvider() { } + public Azure.Provisioning.BicepValue IsAutoProvisioned { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadLoginFlow Login { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadRegistration Registration { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadValidation Validation { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadRegistration() { } + public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretCertificateIssuer { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretCertificateSubjectAlternativeName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretCertificateThumbprintString { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue OpenIdIssuer { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAadValidation : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAadValidation() { } + public Azure.Provisioning.BicepList AllowedAudiences { get { throw null; } set { } } + public Azure.Provisioning.AppService.DefaultAuthorizationPolicy DefaultAuthorizationPolicy { get { throw null; } set { } } + public Azure.Provisioning.AppService.JwtClaimChecks JwtClaimChecks { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAppleProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAppleProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAppleRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceAppleRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceAppleRegistration() { } + public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class AppServiceArmPlan : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceArmPlan() { } @@ -433,12 +498,46 @@ public enum AppServiceEnvironmentUpgradePreference Late = 2, Manual = 3, } + public partial class AppServiceFacebookProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceFacebookProvider() { } + public Azure.Provisioning.BicepValue GraphApiVersion { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceForwardProxy : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceForwardProxy() { } + public Azure.Provisioning.BicepValue Convention { get { throw null; } set { } } + public Azure.Provisioning.BicepValue CustomHostHeaderName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue CustomProtoHeaderName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum AppServiceFtpsState { AllAllowed = 0, FtpsOnly = 1, Disabled = 2, } + public partial class AppServiceGitHubProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceGitHubProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.ClientRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceGoogleProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceGoogleProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.ClientRegistration Registration { get { throw null; } set { } } + public Azure.Provisioning.BicepList ValidationAllowedAudiences { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class AppServiceHostName : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceHostName() { } @@ -467,6 +566,28 @@ public AppServiceHttpLogsConfig() { } public Azure.Provisioning.AppService.FileSystemHttpLogsConfig FileSystem { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class AppServiceHttpSettings : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceHttpSettings() { } + public Azure.Provisioning.AppService.AppServiceForwardProxy ForwardProxy { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsHttpsRequired { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RoutesApiPrefix { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceIdentityProviders : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceIdentityProviders() { } + public Azure.Provisioning.AppService.AppServiceAppleProvider Apple { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadProvider AzureActiveDirectory { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceStaticWebAppsProvider AzureStaticWebApps { get { throw null; } set { } } + public Azure.Provisioning.BicepDictionary CustomOpenIdConnectProviders { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceFacebookProvider Facebook { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceGitHubProvider GitHub { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceGoogleProvider Google { get { throw null; } set { } } + public Azure.Provisioning.AppService.LegacyMicrosoftAccount LegacyMicrosoftAccount { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceTwitterProvider Twitter { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum AppServiceIPFilterTag { Default = 0, @@ -510,6 +631,7 @@ public partial class AppServicePlan : Azure.Provisioning.Primitives.Provisionabl public Azure.Provisioning.BicepValue GeoRegion { get { throw null; } } public Azure.Provisioning.AppService.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } + public Azure.Provisioning.BicepValue IsAsyncScalingEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsElasticScaleEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsHyperV { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsPerSiteScaling { get { throw null; } set { } } @@ -671,6 +793,13 @@ public static partial class ResourceVersions public static readonly string V2024_11_01; } } + public partial class AppServiceStaticWebAppsProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceStaticWebAppsProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RegistrationClientId { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class AppServiceStorageAccessInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public AppServiceStorageAccessInfo() { } @@ -756,6 +885,22 @@ public enum AppServiceTlsCipherSuite [System.Runtime.Serialization.DataMemberAttribute(Name="TLS_RSA_WITH_AES_128_CBC_SHA")] TlsRsaWithAes128CbcSha = 16, } + public partial class AppServiceTokenStore : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceTokenStore() { } + public Azure.Provisioning.BicepValue AzureBlobStorageSasUrlSettingName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue FileSystemDirectory { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue TokenRefreshExtensionHours { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class AppServiceTwitterProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AppServiceTwitterProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.AppService.TwitterRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum AppServiceUsageState { Normal = 0, @@ -879,6 +1024,14 @@ public AseV3NetworkingConfigurationData() { } public Azure.Provisioning.BicepList WindowsOutboundIPAddresses { get { throw null; } } protected override void DefineProvisionableProperties() { } } + public partial class AuthPlatform : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public AuthPlatform() { } + public Azure.Provisioning.BicepValue ConfigFilePath { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RuntimeVersion { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum AutoGeneratedDomainNameLabelScope { TenantReuse = 0, @@ -958,6 +1111,17 @@ public enum ClientCertMode Optional = 1, OptionalInteractiveUser = 2, } + public enum ClientCredentialMethod + { + ClientSecretPost = 0, + } + public partial class ClientRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public ClientRegistration() { } + public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class CloningInfo : Azure.Provisioning.Primitives.ProvisionableConstruct { public CloningInfo() { } @@ -1017,6 +1181,11 @@ public ContainerAppsConfiguration() { } public Azure.Provisioning.BicepValue PlatformReservedDnsIP { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public enum CookieExpirationConvention + { + FixedTime = 0, + IdentityProviderDerived = 1, + } public partial class CustomDnsSuffixConfiguration : Azure.Provisioning.Primitives.ProvisionableResource { public CustomDnsSuffixConfiguration(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } @@ -1104,6 +1273,21 @@ public enum CustomHostNameDnsRecordType CName = 0, A = 1, } + public partial class CustomOpenIdConnectProvider : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public CustomOpenIdConnectProvider() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.AppService.OpenIdConnectLogin Login { get { throw null; } set { } } + public Azure.Provisioning.AppService.OpenIdConnectRegistration Registration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class DefaultAuthorizationPolicy : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public DefaultAuthorizationPolicy() { } + public Azure.Provisioning.BicepList AllowedApplications { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceAadAllowedPrincipals AllowedPrincipals { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum DomainNotRenewableReason { RegistrationStatusNotSupportedForRenewal = 0, @@ -1166,6 +1350,12 @@ public FileSystemHttpLogsConfig() { } public Azure.Provisioning.BicepValue RetentionInMb { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public enum ForwardProxyConvention + { + NoProxy = 0, + Standard = 1, + Custom = 2, + } public enum FrontEndServiceType { NodePort = 0, @@ -1175,6 +1365,7 @@ public partial class FunctionAppAlwaysReadyConfig : Azure.Provisioning.Primitive { public FunctionAppAlwaysReadyConfig() { } public Azure.Provisioning.BicepValue AlwaysReadyInstanceCount { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue InstanceCount { get { throw null; } set { } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } @@ -1223,8 +1414,11 @@ public FunctionAppScaleAndConcurrency() { } public Azure.Provisioning.BicepValue ConcurrentHttpPerInstanceConcurrency { get { throw null; } set { } } public Azure.Provisioning.BicepValue FunctionAppInstanceMemoryMB { get { throw null; } set { } } public Azure.Provisioning.BicepValue FunctionAppMaximumInstanceCount { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue HttpPerInstanceConcurrency { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue InstanceMemoryMB { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue MaximumInstanceCount { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } @@ -1280,6 +1474,15 @@ public GitHubActionContainerConfiguration() { } public Azure.Provisioning.BicepValue Username { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class GlobalValidation : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public GlobalValidation() { } + public Azure.Provisioning.BicepList ExcludedPaths { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsAuthenticationRequired { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RedirectToProvider { get { throw null; } set { } } + public Azure.Provisioning.BicepValue UnauthenticatedClientAction { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class HostingEnvironmentMultiRolePool : Azure.Provisioning.Primitives.ProvisionableResource { public HostingEnvironmentMultiRolePool(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } @@ -1473,6 +1676,13 @@ public HttpRequestHandlerMapping() { } public Azure.Provisioning.BicepValue ScriptProcessor { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class JwtClaimChecks : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public JwtClaimChecks() { } + public Azure.Provisioning.BicepList AllowedClientApplications { get { throw null; } set { } } + public Azure.Provisioning.BicepList AllowedGroups { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum KeyVaultSecretStatus { Unknown = 0, @@ -1537,6 +1747,15 @@ public enum KubeEnvironmentProvisioningState UpgradeRequested = 8, UpgradeFailed = 9, } + public partial class LegacyMicrosoftAccount : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public LegacyMicrosoftAccount() { } + public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepList LoginScopes { get { throw null; } set { } } + public Azure.Provisioning.AppService.ClientRegistration Registration { get { throw null; } set { } } + public Azure.Provisioning.BicepList ValidationAllowedAudiences { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum LoadBalancingMode { None = 0, @@ -1552,6 +1771,13 @@ public LogAnalyticsConfiguration() { } public Azure.Provisioning.BicepValue SharedKey { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class LoginFlowNonceSettings : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public LoginFlowNonceSettings() { } + public Azure.Provisioning.BicepValue NonceExpirationInterval { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ValidateNonce { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class LogsSiteConfig : Azure.Provisioning.Primitives.ProvisionableResource { public LogsSiteConfig(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } @@ -1670,6 +1896,48 @@ public enum MSDeployProvisioningState [System.Runtime.Serialization.DataMemberAttribute(Name="canceled")] Canceled = 4, } + public partial class OpenIdConnectClientCredential : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OpenIdConnectClientCredential() { } + public Azure.Provisioning.BicepValue ClientSecretSettingName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Method { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class OpenIdConnectConfig : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OpenIdConnectConfig() { } + public Azure.Provisioning.BicepValue AuthorizationEndpoint { get { throw null; } set { } } + public Azure.Provisioning.BicepValue CertificationUri { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Issuer { get { throw null; } set { } } + public Azure.Provisioning.BicepValue TokenEndpoint { get { throw null; } set { } } + public Azure.Provisioning.BicepValue WellKnownOpenIdConfiguration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class OpenIdConnectLogin : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OpenIdConnectLogin() { } + public Azure.Provisioning.BicepValue NameClaimType { get { throw null; } set { } } + public Azure.Provisioning.BicepList Scopes { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class OpenIdConnectRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OpenIdConnectRegistration() { } + public Azure.Provisioning.AppService.OpenIdConnectClientCredential ClientCredential { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ClientId { get { throw null; } set { } } + public Azure.Provisioning.AppService.OpenIdConnectConfig OpenIdConnectConfiguration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public partial class OutboundVnetRouting : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public OutboundVnetRouting() { } + public Azure.Provisioning.BicepValue IsAllTrafficEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsApplicationTrafficEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsBackupRestoreTrafficEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsContentShareTrafficEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsImagePullTrafficEnabled { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class PrivateAccessSubnet : Azure.Provisioning.Primitives.ProvisionableConstruct { public PrivateAccessSubnet() { } @@ -1948,6 +2216,59 @@ public enum ScmType [System.Runtime.Serialization.DataMemberAttribute(Name="VSTSRM")] Vstsrm = 13, } + public partial class SiteAuthSettingsV2 : Azure.Provisioning.Primitives.ProvisionableResource + { + public SiteAuthSettingsV2(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } + public Azure.Provisioning.AppService.GlobalValidation GlobalValidation { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceHttpSettings HttpSettings { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Id { get { throw null; } } + public Azure.Provisioning.AppService.AppServiceIdentityProviders IdentityProviders { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } + public Azure.Provisioning.AppService.WebAppLoginInfo Login { get { throw null; } set { } } + public Azure.Provisioning.AppService.AuthPlatform Platform { get { throw null; } set { } } + public Azure.Provisioning.Resources.SystemData SystemData { get { throw null; } } + protected override void DefineProvisionableProperties() { } + public static Azure.Provisioning.AppService.SiteAuthSettingsV2 FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } + } + public partial class SiteCertificate : Azure.Provisioning.Primitives.ProvisionableResource + { + public SiteCertificate(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 { } } + public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } } + public Azure.Provisioning.BicepValue FriendlyName { get { throw null; } } + public Azure.Provisioning.AppService.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } } + public Azure.Provisioning.BicepList HostNames { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Id { get { throw null; } } + public Azure.Provisioning.BicepValue IssueOn { get { throw null; } } + public Azure.Provisioning.BicepValue Issuer { get { throw null; } } + public Azure.Provisioning.BicepValue IsValid { get { throw null; } } + public Azure.Provisioning.BicepValue KeyVaultId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue KeyVaultSecretName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue KeyVaultSecretStatus { get { throw null; } } + public Azure.Provisioning.BicepValue Kind { 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.AppService.WebSite? Parent { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Password { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PfxBlob { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PublicKeyHash { get { throw null; } } + public Azure.Provisioning.BicepValue SelfLink { get { throw null; } } + public Azure.Provisioning.BicepValue ServerFarmId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue SiteName { get { throw null; } } + public Azure.Provisioning.BicepValue SubjectName { get { throw null; } } + public Azure.Provisioning.Resources.SystemData SystemData { get { throw null; } } + public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } + public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } } + protected override void DefineProvisionableProperties() { } + public static Azure.Provisioning.AppService.SiteCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } + public static partial class ResourceVersions + { + public static readonly string V2024_11_01; + } + } public partial class SiteConfigProperties : Azure.Provisioning.Primitives.ProvisionableConstruct { public SiteConfigProperties() { } @@ -1970,6 +2291,7 @@ public SiteConfigProperties() { } public Azure.Provisioning.BicepValue FunctionAppScaleLimit { get { throw null; } set { } } public Azure.Provisioning.BicepList HandlerMappings { get { throw null; } set { } } public Azure.Provisioning.BicepValue HealthCheckPath { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Http20ProxyFlag { get { throw null; } set { } } public Azure.Provisioning.BicepList IPSecurityRestrictions { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsAlwaysOn { get { throw null; } set { } } @@ -2033,6 +2355,7 @@ public partial class SiteContainer : Azure.Provisioning.Primitives.Provisionable public Azure.Provisioning.BicepList EnvironmentVariables { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Image { get { throw null; } set { } } + public Azure.Provisioning.BicepValue InheritAppSettingsAndConnectionStrings { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsMain { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue LastModifiedOn { get { throw null; } } @@ -2595,6 +2918,45 @@ public static partial class ResourceVersions public static readonly string V2024_11_01; } } + public partial class SiteSlotCertificate : Azure.Provisioning.Primitives.ProvisionableResource + { + public SiteSlotCertificate(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 { } } + public Azure.Provisioning.BicepValue ExpireOn { get { throw null; } } + public Azure.Provisioning.BicepValue FriendlyName { get { throw null; } } + public Azure.Provisioning.AppService.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } } + public Azure.Provisioning.BicepList HostNames { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Id { get { throw null; } } + public Azure.Provisioning.BicepValue IssueOn { get { throw null; } } + public Azure.Provisioning.BicepValue Issuer { get { throw null; } } + public Azure.Provisioning.BicepValue IsValid { get { throw null; } } + public Azure.Provisioning.BicepValue KeyVaultId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue KeyVaultSecretName { get { throw null; } set { } } + public Azure.Provisioning.BicepValue KeyVaultSecretStatus { get { throw null; } } + public Azure.Provisioning.BicepValue Kind { 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.AppService.WebSiteSlot? Parent { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Password { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PfxBlob { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PublicKeyHash { get { throw null; } } + public Azure.Provisioning.BicepValue SelfLink { get { throw null; } } + public Azure.Provisioning.BicepValue ServerFarmId { get { throw null; } set { } } + public Azure.Provisioning.BicepValue SiteName { get { throw null; } } + public Azure.Provisioning.BicepValue SubjectName { get { throw null; } } + public Azure.Provisioning.Resources.SystemData SystemData { get { throw null; } } + public Azure.Provisioning.BicepDictionary Tags { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Thumbprint { get { throw null; } } + public Azure.Provisioning.BicepValue ThumbprintString { get { throw null; } } + protected override void DefineProvisionableProperties() { } + public static Azure.Provisioning.AppService.SiteSlotCertificate FromExisting(string bicepIdentifier, string? resourceVersion = null) { throw null; } + public static partial class ResourceVersions + { + public static readonly string V2024_11_01; + } + } public partial class SiteSlotDeployment : Azure.Provisioning.Primitives.ProvisionableResource { public SiteSlotDeployment(string bicepIdentifier, string? resourceVersion = null) : base (default(string), default(Azure.Core.ResourceType), default(string)) { } @@ -3000,6 +3362,7 @@ public partial class SiteSlotSiteContainer : Azure.Provisioning.Primitives.Provi public Azure.Provisioning.BicepList EnvironmentVariables { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepValue Image { get { throw null; } set { } } + public Azure.Provisioning.BicepValue InheritAppSettingsAndConnectionStrings { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsMain { get { throw null; } set { } } public Azure.Provisioning.BicepValue Kind { get { throw null; } set { } } public Azure.Provisioning.BicepValue LastModifiedOn { get { throw null; } } @@ -3749,6 +4112,20 @@ public StatusCodesRangeBasedTrigger() { } public Azure.Provisioning.BicepValue TimeInterval { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class TwitterRegistration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public TwitterRegistration() { } + public Azure.Provisioning.BicepValue ConsumerKey { get { throw null; } set { } } + public Azure.Provisioning.BicepValue ConsumerSecretSettingName { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } + public enum UnauthenticatedClientActionV2 + { + RedirectToLoginPage = 0, + AllowAnonymous = 1, + Return401 = 2, + Return403 = 3, + } public partial class VirtualApplication : Azure.Provisioning.Primitives.ProvisionableConstruct { public VirtualApplication() { } @@ -3765,6 +4142,13 @@ public VirtualDirectory() { } public Azure.Provisioning.BicepValue VirtualPath { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class WebAppCookieExpiration : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public WebAppCookieExpiration() { } + public Azure.Provisioning.BicepValue Convention { get { throw null; } set { } } + public Azure.Provisioning.BicepValue TimeToExpiration { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public partial class WebAppEnvironmentVariable : Azure.Provisioning.Primitives.ProvisionableConstruct { public WebAppEnvironmentVariable() { } @@ -3772,6 +4156,17 @@ public WebAppEnvironmentVariable() { } public Azure.Provisioning.BicepValue Value { get { throw null; } set { } } protected override void DefineProvisionableProperties() { } } + public partial class WebAppLoginInfo : Azure.Provisioning.Primitives.ProvisionableConstruct + { + public WebAppLoginInfo() { } + public Azure.Provisioning.BicepList AllowedExternalRedirectUrls { get { throw null; } set { } } + public Azure.Provisioning.AppService.WebAppCookieExpiration CookieExpiration { get { throw null; } set { } } + public Azure.Provisioning.AppService.LoginFlowNonceSettings Nonce { get { throw null; } set { } } + public Azure.Provisioning.BicepValue PreserveUrlFragmentsForLogins { get { throw null; } set { } } + public Azure.Provisioning.BicepValue RoutesLogoutEndpoint { get { throw null; } set { } } + public Azure.Provisioning.AppService.AppServiceTokenStore TokenStore { get { throw null; } set { } } + protected override void DefineProvisionableProperties() { } + } public enum WebAppLogLevel { Off = 0, @@ -3819,6 +4214,8 @@ public partial class WebSite : Azure.Provisioning.Primitives.ProvisionableResour public Azure.Provisioning.BicepValue InProgressOperationId { get { throw null; } } public Azure.Provisioning.BicepValue IPMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsClientAffinityEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsClientAffinityPartitioningEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsClientAffinityProxyEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsClientCertEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsDefaultContainer { get { throw null; } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -3828,6 +4225,7 @@ public partial class WebSite : Azure.Provisioning.Primitives.ProvisionableResour public Azure.Provisioning.BicepValue IsHyperV { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsReserved { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsScmSiteAlsoStopped { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsSshEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsStorageAccountRequired { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsVnetBackupRestoreEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsVnetContentShareEnabled { get { throw null; } set { } } @@ -3842,6 +4240,7 @@ public partial class WebSite : Azure.Provisioning.Primitives.ProvisionableResour public Azure.Provisioning.BicepValue MaxNumberOfWorkers { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } set { } } public Azure.Provisioning.BicepValue OutboundIPAddresses { get { throw null; } } + public Azure.Provisioning.AppService.OutboundVnetRouting OutboundVnetRouting { get { throw null; } set { } } public Azure.Provisioning.BicepValue PossibleOutboundIPAddresses { get { throw null; } } public Azure.Provisioning.BicepValue PublicNetworkAccess { get { throw null; } set { } } public Azure.Provisioning.BicepValue RedundancyMode { get { throw null; } set { } } @@ -3928,6 +4327,7 @@ public partial class WebSiteConfig : Azure.Provisioning.Primitives.Provisionable public Azure.Provisioning.BicepValue FunctionAppScaleLimit { get { throw null; } set { } } public Azure.Provisioning.BicepList HandlerMappings { get { throw null; } set { } } public Azure.Provisioning.BicepValue HealthCheckPath { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Http20ProxyFlag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPSecurityRestrictions { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } @@ -4307,6 +4707,8 @@ public partial class WebSiteSlot : Azure.Provisioning.Primitives.ProvisionableRe public Azure.Provisioning.BicepValue InProgressOperationId { get { throw null; } } public Azure.Provisioning.BicepValue IPMode { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsClientAffinityEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsClientAffinityPartitioningEnabled { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsClientAffinityProxyEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsClientCertEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsDefaultContainer { get { throw null; } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } @@ -4316,6 +4718,7 @@ public partial class WebSiteSlot : Azure.Provisioning.Primitives.ProvisionableRe public Azure.Provisioning.BicepValue IsHyperV { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsReserved { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsScmSiteAlsoStopped { get { throw null; } set { } } + public Azure.Provisioning.BicepValue IsSshEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsStorageAccountRequired { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsVnetBackupRestoreEnabled { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsVnetContentShareEnabled { get { throw null; } set { } } @@ -4330,6 +4733,7 @@ public partial class WebSiteSlot : Azure.Provisioning.Primitives.ProvisionableRe public Azure.Provisioning.BicepValue MaxNumberOfWorkers { get { throw null; } } public Azure.Provisioning.BicepValue Name { get { throw null; } } public Azure.Provisioning.BicepValue OutboundIPAddresses { get { throw null; } } + public Azure.Provisioning.AppService.OutboundVnetRouting OutboundVnetRouting { get { throw null; } set { } } public Azure.Provisioning.AppService.WebSite? Parent { get { throw null; } set { } } public Azure.Provisioning.BicepValue PossibleOutboundIPAddresses { get { throw null; } } public Azure.Provisioning.BicepValue PublicNetworkAccess { get { throw null; } set { } } @@ -4411,6 +4815,7 @@ public partial class WebSiteSlotConfig : Azure.Provisioning.Primitives.Provision public Azure.Provisioning.BicepValue FunctionAppScaleLimit { get { throw null; } set { } } public Azure.Provisioning.BicepList HandlerMappings { get { throw null; } set { } } public Azure.Provisioning.BicepValue HealthCheckPath { get { throw null; } set { } } + public Azure.Provisioning.BicepValue Http20ProxyFlag { get { throw null; } set { } } public Azure.Provisioning.BicepValue Id { get { throw null; } } public Azure.Provisioning.BicepList IPSecurityRestrictions { get { throw null; } set { } } public Azure.Provisioning.BicepValue IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj b/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj index 2a355668440d..d70fe63098e1 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj @@ -2,9 +2,9 @@ Azure.Provisioning.AppService simplifies declarative resource provisioning in .NET. - 1.2.0-beta.1 + 1.2.0 - 1.1.0 + 1.1.1 $(RequiredTargetFrameworks) 12 diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/FunctionAppAlwaysReadyConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/FunctionAppAlwaysReadyConfig.cs new file mode 100644 index 000000000000..d297a5270bc6 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/FunctionAppAlwaysReadyConfig.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; +using System.ComponentModel; + +namespace Azure.Provisioning.AppService; + +public partial class FunctionAppAlwaysReadyConfig : ProvisionableConstruct +{ + /// + /// Sets the number of 'Always Ready' instances for a given + /// function group or a specific function. For additional information see + /// https://aka.ms/flexconsumption/alwaysready. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue InstanceCount + { + get { Initialize(); return _instanceCount!; } + set { Initialize(); _instanceCount!.Assign(value); } + } + private BicepValue? _instanceCount; +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/FunctionAppScaleAndConcurrency.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/FunctionAppScaleAndConcurrency.cs new file mode 100644 index 000000000000..f1a00e63ce1d --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/FunctionAppScaleAndConcurrency.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System.ComponentModel; +using Azure.Provisioning.Primitives; + +namespace Azure.Provisioning.AppService; + +/// +/// Scale and concurrency settings for the function app. +/// +public partial class FunctionAppScaleAndConcurrency : ProvisionableConstruct +{ + /// + /// The maximum number of instances for the function app. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue MaximumInstanceCount + { + get { Initialize(); return _maximumInstanceCount!; } + set { Initialize(); _maximumInstanceCount!.Assign(value); } + } + private BicepValue? _maximumInstanceCount; + + /// + /// Set the amount of memory allocated to each instance of the function app + /// in MB. CPU and network bandwidth are allocated proportionally. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue InstanceMemoryMB + { + get { Initialize(); return _instanceMemoryMB!; } + set { Initialize(); _instanceMemoryMB!.Assign(value); } + } + private BicepValue? _instanceMemoryMB; + + /// + /// The maximum number of concurrent HTTP trigger invocations per instance. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue HttpPerInstanceConcurrency + { + get { Initialize(); return _httpPerInstanceConcurrency!; } + set { Initialize(); _httpPerInstanceConcurrency!.Assign(value); } + } + private BicepValue? _httpPerInstanceConcurrency; +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppCertificate.cs index c0f974030a94..2800620fcb90 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppCertificate.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppCertificate.cs @@ -70,7 +70,7 @@ public BicepList HostNames private BicepList? _hostNames; /// - /// Key Vault Csm resource Id. + /// Azure Key Vault Csm resource Id. /// public BicepValue KeyVaultId { @@ -80,7 +80,7 @@ public BicepValue KeyVaultId private BicepValue? _keyVaultId; /// - /// Key Vault secret name. + /// Azure Key Vault secret name. /// public BicepValue KeyVaultSecretName { @@ -122,8 +122,7 @@ public BicepValue PfxBlob private BicepValue? _pfxBlob; /// - /// Resource ID of the associated App Service plan, formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + /// Resource ID of the associated App Service plan. /// public BicepValue ServerFarmId { diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlan.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlan.cs index 0aa2d86b204f..8d608cc75edf 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlan.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/AppServicePlan.cs @@ -70,6 +70,19 @@ public HostingEnvironmentProfile HostingEnvironmentProfile } private HostingEnvironmentProfile? _hostingEnvironmentProfile; + /// + /// If <code>true</code>, this App Service Plan will attempt to + /// scale asynchronously if there are insufficient workers to scale + /// synchronously. If <code>false</code>, this App + /// Service Plan will only attempt sync scaling. + /// + public BicepValue IsAsyncScalingEnabled + { + get { Initialize(); return _isAsyncScalingEnabled!; } + set { Initialize(); _isAsyncScalingEnabled!.Assign(value); } + } + private BicepValue? _isAsyncScalingEnabled; + /// /// ServerFarm supports ElasticScale. Apps in this plan will scale as if /// the ServerFarm was ElasticPremium sku. @@ -363,6 +376,7 @@ protected override void DefineProvisionableProperties() _extendedLocation = DefineModelProperty("ExtendedLocation", ["extendedLocation"]); _freeOfferExpireOn = DefineProperty("FreeOfferExpireOn", ["properties", "freeOfferExpirationTime"]); _hostingEnvironmentProfile = DefineModelProperty("HostingEnvironmentProfile", ["properties", "hostingEnvironmentProfile"]); + _isAsyncScalingEnabled = DefineProperty("IsAsyncScalingEnabled", ["properties", "asyncScalingEnabled"]); _isElasticScaleEnabled = DefineProperty("IsElasticScaleEnabled", ["properties", "elasticScaleEnabled"]); _isHyperV = DefineProperty("IsHyperV", ["properties", "hyperV"]); _isPerSiteScaling = DefineProperty("IsPerSiteScaling", ["properties", "perSiteScaling"]); diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppRegistration.cs new file mode 100644 index 000000000000..1fdec37bdc65 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppRegistration.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the app registration for providers that have +/// app ids and app secrets. +/// +public partial class AppRegistration : ProvisionableConstruct +{ + /// + /// The App ID of the app used for login. + /// + public BicepValue AppId + { + get { Initialize(); return _appId!; } + set { Initialize(); _appId!.Assign(value); } + } + private BicepValue? _appId; + + /// + /// The app setting name that contains the app secret. + /// + public BicepValue AppSecretSettingName + { + get { Initialize(); return _appSecretSettingName!; } + set { Initialize(); _appSecretSettingName!.Assign(value); } + } + private BicepValue? _appSecretSettingName; + + /// + /// Creates a new AppRegistration. + /// + public AppRegistration() + { + } + + /// + /// Define all the provisionable properties of AppRegistration. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _appId = DefineProperty("AppId", ["appId"]); + _appSecretSettingName = DefineProperty("AppSecretSettingName", ["appSecretSettingName"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadAllowedPrincipals.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadAllowedPrincipals.cs new file mode 100644 index 000000000000..298f13b2dc10 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadAllowedPrincipals.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Azure Active Directory allowed principals. +/// +public partial class AppServiceAadAllowedPrincipals : ProvisionableConstruct +{ + /// + /// The list of the allowed groups. + /// + public BicepList Groups + { + get { Initialize(); return _groups!; } + set { Initialize(); _groups!.Assign(value); } + } + private BicepList? _groups; + + /// + /// The list of the allowed identities. + /// + public BicepList Identities + { + get { Initialize(); return _identities!; } + set { Initialize(); _identities!.Assign(value); } + } + private BicepList? _identities; + + /// + /// Creates a new AppServiceAadAllowedPrincipals. + /// + public AppServiceAadAllowedPrincipals() + { + } + + /// + /// Define all the provisionable properties of + /// AppServiceAadAllowedPrincipals. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _groups = DefineListProperty("Groups", ["groups"]); + _identities = DefineListProperty("Identities", ["identities"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadLoginFlow.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadLoginFlow.cs new file mode 100644 index 000000000000..be072f7e022f --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadLoginFlow.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Azure Active Directory login flow. +/// +public partial class AppServiceAadLoginFlow : ProvisionableConstruct +{ + /// + /// Login parameters to send to the OpenID Connect authorization endpoint + /// when a user logs in. Each parameter must be in the form + /// "key=value". + /// + public BicepList LoginParameters + { + get { Initialize(); return _loginParameters!; } + set { Initialize(); _loginParameters!.Assign(value); } + } + private BicepList? _loginParameters; + + /// + /// <code>true</code> if the www-authenticate provider should + /// be omitted from the request; otherwise, <code>false</code>. + /// + public BicepValue IsWwwAuthenticateDisabled + { + get { Initialize(); return _isWwwAuthenticateDisabled!; } + set { Initialize(); _isWwwAuthenticateDisabled!.Assign(value); } + } + private BicepValue? _isWwwAuthenticateDisabled; + + /// + /// Creates a new AppServiceAadLoginFlow. + /// + public AppServiceAadLoginFlow() + { + } + + /// + /// Define all the provisionable properties of AppServiceAadLoginFlow. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _loginParameters = DefineListProperty("LoginParameters", ["loginParameters"]); + _isWwwAuthenticateDisabled = DefineProperty("IsWwwAuthenticateDisabled", ["disableWWWAuthenticate"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadProvider.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadProvider.cs new file mode 100644 index 000000000000..2aeb2f5eb6dd --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadProvider.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Azure Active directory provider. +/// +public partial class AppServiceAadProvider : ProvisionableConstruct +{ + /// + /// <code>false</code> if the Azure Active Directory provider + /// should not be enabled despite the set registration; otherwise, + /// <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The configuration settings of the Azure Active Directory app + /// registration. + /// + public AppServiceAadRegistration Registration + { + get { Initialize(); return _registration!; } + set { Initialize(); AssignOrReplace(ref _registration, value); } + } + private AppServiceAadRegistration? _registration; + + /// + /// The configuration settings of the Azure Active Directory login flow. + /// + public AppServiceAadLoginFlow Login + { + get { Initialize(); return _login!; } + set { Initialize(); AssignOrReplace(ref _login, value); } + } + private AppServiceAadLoginFlow? _login; + + /// + /// The configuration settings of the Azure Active Directory token + /// validation flow. + /// + public AppServiceAadValidation Validation + { + get { Initialize(); return _validation!; } + set { Initialize(); AssignOrReplace(ref _validation, value); } + } + private AppServiceAadValidation? _validation; + + /// + /// Gets a value indicating whether the Azure AD configuration was + /// auto-provisioned using 1st party tooling. This is an + /// internal flag primarily intended to support the Azure Management + /// Portal. Users should not read or write to this property. + /// + public BicepValue IsAutoProvisioned + { + get { Initialize(); return _isAutoProvisioned!; } + set { Initialize(); _isAutoProvisioned!.Assign(value); } + } + private BicepValue? _isAutoProvisioned; + + /// + /// Creates a new AppServiceAadProvider. + /// + public AppServiceAadProvider() + { + } + + /// + /// Define all the provisionable properties of AppServiceAadProvider. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registration = DefineModelProperty("Registration", ["registration"]); + _login = DefineModelProperty("Login", ["login"]); + _validation = DefineModelProperty("Validation", ["validation"]); + _isAutoProvisioned = DefineProperty("IsAutoProvisioned", ["isAutoProvisioned"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadRegistration.cs new file mode 100644 index 000000000000..9b40112991ea --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadRegistration.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Azure Active Directory app registration. +/// +public partial class AppServiceAadRegistration : ProvisionableConstruct +{ + /// + /// The OpenID Connect Issuer URI that represents the entity which issues + /// access tokens for this application. When using Azure + /// Active Directory, this value is the URI of the directory tenant, e.g. + /// `https://login.microsoftonline.com/v2.0/{tenant-guid}/`. + /// This URI is a case-sensitive identifier for the token + /// issuer. More information on OpenID Connect Discovery: + /// http://openid.net/specs/openid-connect-discovery-1_0.html + /// + public BicepValue OpenIdIssuer + { + get { Initialize(); return _openIdIssuer!; } + set { Initialize(); _openIdIssuer!.Assign(value); } + } + private BicepValue? _openIdIssuer; + + /// + /// The Client ID of this relying party application, known as the + /// client_id. This setting is required for enabling OpenID + /// Connection authentication with Azure Active Directory or + /// other 3rd party OpenID Connect providers. More + /// information on OpenID Connect: + /// http://openid.net/specs/openid-connect-core-1_0.html + /// + public BicepValue ClientId + { + get { Initialize(); return _clientId!; } + set { Initialize(); _clientId!.Assign(value); } + } + private BicepValue? _clientId; + + /// + /// The app setting name that contains the client secret of the relying + /// party application. + /// + public BicepValue ClientSecretSettingName + { + get { Initialize(); return _clientSecretSettingName!; } + set { Initialize(); _clientSecretSettingName!.Assign(value); } + } + private BicepValue? _clientSecretSettingName; + + /// + /// An alternative to the client secret, that is the thumbprint of a + /// certificate used for signing purposes. This property acts as + /// a replacement for the Client Secret. It is also optional. + /// + public BicepValue ClientSecretCertificateThumbprintString + { + get { Initialize(); return _clientSecretCertificateThumbprintString!; } + set { Initialize(); _clientSecretCertificateThumbprintString!.Assign(value); } + } + private BicepValue? _clientSecretCertificateThumbprintString; + + /// + /// An alternative to the client secret thumbprint, that is the subject + /// alternative name of a certificate used for signing purposes. This + /// property acts as a replacement for the Client Secret + /// Certificate Thumbprint. It is also optional. + /// + public BicepValue ClientSecretCertificateSubjectAlternativeName + { + get { Initialize(); return _clientSecretCertificateSubjectAlternativeName!; } + set { Initialize(); _clientSecretCertificateSubjectAlternativeName!.Assign(value); } + } + private BicepValue? _clientSecretCertificateSubjectAlternativeName; + + /// + /// An alternative to the client secret thumbprint, that is the issuer of a + /// certificate used for signing purposes. This property acts as + /// a replacement for the Client Secret Certificate + /// Thumbprint. It is also optional. + /// + public BicepValue ClientSecretCertificateIssuer + { + get { Initialize(); return _clientSecretCertificateIssuer!; } + set { Initialize(); _clientSecretCertificateIssuer!.Assign(value); } + } + private BicepValue? _clientSecretCertificateIssuer; + + /// + /// Creates a new AppServiceAadRegistration. + /// + public AppServiceAadRegistration() + { + } + + /// + /// Define all the provisionable properties of AppServiceAadRegistration. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _openIdIssuer = DefineProperty("OpenIdIssuer", ["openIdIssuer"]); + _clientId = DefineProperty("ClientId", ["clientId"]); + _clientSecretSettingName = DefineProperty("ClientSecretSettingName", ["clientSecretSettingName"]); + _clientSecretCertificateThumbprintString = DefineProperty("ClientSecretCertificateThumbprintString", ["clientSecretCertificateThumbprint"]); + _clientSecretCertificateSubjectAlternativeName = DefineProperty("ClientSecretCertificateSubjectAlternativeName", ["clientSecretCertificateSubjectAlternativeName"]); + _clientSecretCertificateIssuer = DefineProperty("ClientSecretCertificateIssuer", ["clientSecretCertificateIssuer"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadValidation.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadValidation.cs new file mode 100644 index 000000000000..879af3232939 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAadValidation.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Azure Active Directory token validation +/// flow. +/// +public partial class AppServiceAadValidation : ProvisionableConstruct +{ + /// + /// The configuration settings of the checks that should be made while + /// validating the JWT Claims. + /// + public JwtClaimChecks JwtClaimChecks + { + get { Initialize(); return _jwtClaimChecks!; } + set { Initialize(); AssignOrReplace(ref _jwtClaimChecks, value); } + } + private JwtClaimChecks? _jwtClaimChecks; + + /// + /// The list of audiences that can make successful + /// authentication/authorization requests. + /// + public BicepList AllowedAudiences + { + get { Initialize(); return _allowedAudiences!; } + set { Initialize(); _allowedAudiences!.Assign(value); } + } + private BicepList? _allowedAudiences; + + /// + /// The configuration settings of the default authorization policy. + /// + public DefaultAuthorizationPolicy DefaultAuthorizationPolicy + { + get { Initialize(); return _defaultAuthorizationPolicy!; } + set { Initialize(); AssignOrReplace(ref _defaultAuthorizationPolicy, value); } + } + private DefaultAuthorizationPolicy? _defaultAuthorizationPolicy; + + /// + /// Creates a new AppServiceAadValidation. + /// + public AppServiceAadValidation() + { + } + + /// + /// Define all the provisionable properties of AppServiceAadValidation. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _jwtClaimChecks = DefineModelProperty("JwtClaimChecks", ["jwtClaimChecks"]); + _allowedAudiences = DefineListProperty("AllowedAudiences", ["allowedAudiences"]); + _defaultAuthorizationPolicy = DefineModelProperty("DefaultAuthorizationPolicy", ["defaultAuthorizationPolicy"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAppleProvider.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAppleProvider.cs new file mode 100644 index 000000000000..13716f0fb1e7 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAppleProvider.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Apple provider. +/// +public partial class AppServiceAppleProvider : ProvisionableConstruct +{ + /// + /// <code>false</code> if the Apple provider should not be + /// enabled despite the set registration; otherwise, + /// <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The configuration settings of the Apple registration. + /// + public AppServiceAppleRegistration Registration + { + get { Initialize(); return _registration!; } + set { Initialize(); AssignOrReplace(ref _registration, value); } + } + private AppServiceAppleRegistration? _registration; + + /// + /// A list of the scopes that should be requested while authenticating. + /// + public BicepList LoginScopes + { + get { Initialize(); return _loginScopes!; } + set { Initialize(); _loginScopes!.Assign(value); } + } + private BicepList? _loginScopes; + + /// + /// Creates a new AppServiceAppleProvider. + /// + public AppServiceAppleProvider() + { + } + + /// + /// Define all the provisionable properties of AppServiceAppleProvider. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registration = DefineModelProperty("Registration", ["registration"]); + _loginScopes = DefineListProperty("LoginScopes", ["login", "scopes"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAppleRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAppleRegistration.cs new file mode 100644 index 000000000000..347df0d1fcd0 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceAppleRegistration.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the registration for the Apple provider. +/// +public partial class AppServiceAppleRegistration : ProvisionableConstruct +{ + /// + /// The Client ID of the app used for login. + /// + public BicepValue ClientId + { + get { Initialize(); return _clientId!; } + set { Initialize(); _clientId!.Assign(value); } + } + private BicepValue? _clientId; + + /// + /// The app setting name that contains the client secret. + /// + public BicepValue ClientSecretSettingName + { + get { Initialize(); return _clientSecretSettingName!; } + set { Initialize(); _clientSecretSettingName!.Assign(value); } + } + private BicepValue? _clientSecretSettingName; + + /// + /// Creates a new AppServiceAppleRegistration. + /// + public AppServiceAppleRegistration() + { + } + + /// + /// Define all the provisionable properties of AppServiceAppleRegistration. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _clientId = DefineProperty("ClientId", ["clientId"]); + _clientSecretSettingName = DefineProperty("ClientSecretSettingName", ["clientSecretSettingName"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceFacebookProvider.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceFacebookProvider.cs new file mode 100644 index 000000000000..bbbcb4b6cfd1 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceFacebookProvider.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Facebook provider. +/// +public partial class AppServiceFacebookProvider : ProvisionableConstruct +{ + /// + /// <code>false</code> if the Facebook provider should not be + /// enabled despite the set registration; otherwise, + /// <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The configuration settings of the app registration for the Facebook + /// provider. + /// + public AppRegistration Registration + { + get { Initialize(); return _registration!; } + set { Initialize(); AssignOrReplace(ref _registration, value); } + } + private AppRegistration? _registration; + + /// + /// The version of the Facebook api to be used while logging in. + /// + public BicepValue GraphApiVersion + { + get { Initialize(); return _graphApiVersion!; } + set { Initialize(); _graphApiVersion!.Assign(value); } + } + private BicepValue? _graphApiVersion; + + /// + /// A list of the scopes that should be requested while authenticating. + /// + public BicepList LoginScopes + { + get { Initialize(); return _loginScopes!; } + set { Initialize(); _loginScopes!.Assign(value); } + } + private BicepList? _loginScopes; + + /// + /// Creates a new AppServiceFacebookProvider. + /// + public AppServiceFacebookProvider() + { + } + + /// + /// Define all the provisionable properties of AppServiceFacebookProvider. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registration = DefineModelProperty("Registration", ["registration"]); + _graphApiVersion = DefineProperty("GraphApiVersion", ["graphApiVersion"]); + _loginScopes = DefineListProperty("LoginScopes", ["login", "scopes"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceForwardProxy.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceForwardProxy.cs new file mode 100644 index 000000000000..4b8ce5098fc4 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceForwardProxy.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of a forward proxy used to make the requests. +/// +public partial class AppServiceForwardProxy : ProvisionableConstruct +{ + /// + /// The convention used to determine the url of the request made. + /// + public BicepValue Convention + { + get { Initialize(); return _convention!; } + set { Initialize(); _convention!.Assign(value); } + } + private BicepValue? _convention; + + /// + /// The name of the header containing the host of the request. + /// + public BicepValue CustomHostHeaderName + { + get { Initialize(); return _customHostHeaderName!; } + set { Initialize(); _customHostHeaderName!.Assign(value); } + } + private BicepValue? _customHostHeaderName; + + /// + /// The name of the header containing the scheme of the request. + /// + public BicepValue CustomProtoHeaderName + { + get { Initialize(); return _customProtoHeaderName!; } + set { Initialize(); _customProtoHeaderName!.Assign(value); } + } + private BicepValue? _customProtoHeaderName; + + /// + /// Creates a new AppServiceForwardProxy. + /// + public AppServiceForwardProxy() + { + } + + /// + /// Define all the provisionable properties of AppServiceForwardProxy. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _convention = DefineProperty("Convention", ["convention"]); + _customHostHeaderName = DefineProperty("CustomHostHeaderName", ["customHostHeaderName"]); + _customProtoHeaderName = DefineProperty("CustomProtoHeaderName", ["customProtoHeaderName"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceGitHubProvider.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceGitHubProvider.cs new file mode 100644 index 000000000000..001cf3a1302c --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceGitHubProvider.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the GitHub provider. +/// +public partial class AppServiceGitHubProvider : ProvisionableConstruct +{ + /// + /// <code>false</code> if the GitHub provider should not be + /// enabled despite the set registration; otherwise, + /// <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The configuration settings of the app registration for the GitHub + /// provider. + /// + public ClientRegistration Registration + { + get { Initialize(); return _registration!; } + set { Initialize(); AssignOrReplace(ref _registration, value); } + } + private ClientRegistration? _registration; + + /// + /// A list of the scopes that should be requested while authenticating. + /// + public BicepList LoginScopes + { + get { Initialize(); return _loginScopes!; } + set { Initialize(); _loginScopes!.Assign(value); } + } + private BicepList? _loginScopes; + + /// + /// Creates a new AppServiceGitHubProvider. + /// + public AppServiceGitHubProvider() + { + } + + /// + /// Define all the provisionable properties of AppServiceGitHubProvider. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registration = DefineModelProperty("Registration", ["registration"]); + _loginScopes = DefineListProperty("LoginScopes", ["login", "scopes"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceGoogleProvider.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceGoogleProvider.cs new file mode 100644 index 000000000000..5f0f4256caea --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceGoogleProvider.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Google provider. +/// +public partial class AppServiceGoogleProvider : ProvisionableConstruct +{ + /// + /// <code>false</code> if the Google provider should not be + /// enabled despite the set registration; otherwise, + /// <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The configuration settings of the app registration for the Google + /// provider. + /// + public ClientRegistration Registration + { + get { Initialize(); return _registration!; } + set { Initialize(); AssignOrReplace(ref _registration, value); } + } + private ClientRegistration? _registration; + + /// + /// A list of the scopes that should be requested while authenticating. + /// + public BicepList LoginScopes + { + get { Initialize(); return _loginScopes!; } + set { Initialize(); _loginScopes!.Assign(value); } + } + private BicepList? _loginScopes; + + /// + /// The configuration settings of the allowed list of audiences from which + /// to validate the JWT token. + /// + public BicepList ValidationAllowedAudiences + { + get { Initialize(); return _validationAllowedAudiences!; } + set { Initialize(); _validationAllowedAudiences!.Assign(value); } + } + private BicepList? _validationAllowedAudiences; + + /// + /// Creates a new AppServiceGoogleProvider. + /// + public AppServiceGoogleProvider() + { + } + + /// + /// Define all the provisionable properties of AppServiceGoogleProvider. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registration = DefineModelProperty("Registration", ["registration"]); + _loginScopes = DefineListProperty("LoginScopes", ["login", "scopes"]); + _validationAllowedAudiences = DefineListProperty("ValidationAllowedAudiences", ["validation", "allowedAudiences"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHttpSettings.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHttpSettings.cs new file mode 100644 index 000000000000..b3182073cdcf --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceHttpSettings.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the HTTP requests for authentication and +/// authorization requests made against App Service +/// Authentication/Authorization. +/// +public partial class AppServiceHttpSettings : ProvisionableConstruct +{ + /// + /// <code>false</code> if the authentication/authorization + /// responses not having the HTTPS scheme are permissible; otherwise, + /// <code>true</code>. + /// + public BicepValue IsHttpsRequired + { + get { Initialize(); return _isHttpsRequired!; } + set { Initialize(); _isHttpsRequired!.Assign(value); } + } + private BicepValue? _isHttpsRequired; + + /// + /// The prefix that should precede all the authentication/authorization + /// paths. + /// + public BicepValue RoutesApiPrefix + { + get { Initialize(); return _routesApiPrefix!; } + set { Initialize(); _routesApiPrefix!.Assign(value); } + } + private BicepValue? _routesApiPrefix; + + /// + /// The configuration settings of a forward proxy used to make the requests. + /// + public AppServiceForwardProxy ForwardProxy + { + get { Initialize(); return _forwardProxy!; } + set { Initialize(); AssignOrReplace(ref _forwardProxy, value); } + } + private AppServiceForwardProxy? _forwardProxy; + + /// + /// Creates a new AppServiceHttpSettings. + /// + public AppServiceHttpSettings() + { + } + + /// + /// Define all the provisionable properties of AppServiceHttpSettings. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isHttpsRequired = DefineProperty("IsHttpsRequired", ["requireHttps"]); + _routesApiPrefix = DefineProperty("RoutesApiPrefix", ["routes", "apiPrefix"]); + _forwardProxy = DefineModelProperty("ForwardProxy", ["forwardProxy"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceIdentityProviders.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceIdentityProviders.cs new file mode 100644 index 000000000000..078886e5a31f --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceIdentityProviders.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of each of the identity providers used to +/// configure App Service Authentication/Authorization. +/// +public partial class AppServiceIdentityProviders : ProvisionableConstruct +{ + /// + /// The configuration settings of the Azure Active directory provider. + /// + public AppServiceAadProvider AzureActiveDirectory + { + get { Initialize(); return _azureActiveDirectory!; } + set { Initialize(); AssignOrReplace(ref _azureActiveDirectory, value); } + } + private AppServiceAadProvider? _azureActiveDirectory; + + /// + /// The configuration settings of the Facebook provider. + /// + public AppServiceFacebookProvider Facebook + { + get { Initialize(); return _facebook!; } + set { Initialize(); AssignOrReplace(ref _facebook, value); } + } + private AppServiceFacebookProvider? _facebook; + + /// + /// The configuration settings of the GitHub provider. + /// + public AppServiceGitHubProvider GitHub + { + get { Initialize(); return _gitHub!; } + set { Initialize(); AssignOrReplace(ref _gitHub, value); } + } + private AppServiceGitHubProvider? _gitHub; + + /// + /// The configuration settings of the Google provider. + /// + public AppServiceGoogleProvider Google + { + get { Initialize(); return _google!; } + set { Initialize(); AssignOrReplace(ref _google, value); } + } + private AppServiceGoogleProvider? _google; + + /// + /// The configuration settings of the legacy Microsoft Account provider. + /// + public LegacyMicrosoftAccount LegacyMicrosoftAccount + { + get { Initialize(); return _legacyMicrosoftAccount!; } + set { Initialize(); AssignOrReplace(ref _legacyMicrosoftAccount, value); } + } + private LegacyMicrosoftAccount? _legacyMicrosoftAccount; + + /// + /// The configuration settings of the Twitter provider. + /// + public AppServiceTwitterProvider Twitter + { + get { Initialize(); return _twitter!; } + set { Initialize(); AssignOrReplace(ref _twitter, value); } + } + private AppServiceTwitterProvider? _twitter; + + /// + /// The configuration settings of the Apple provider. + /// + public AppServiceAppleProvider Apple + { + get { Initialize(); return _apple!; } + set { Initialize(); AssignOrReplace(ref _apple, value); } + } + private AppServiceAppleProvider? _apple; + + /// + /// The configuration settings of the Azure Static Web Apps provider. + /// + public AppServiceStaticWebAppsProvider AzureStaticWebApps + { + get { Initialize(); return _azureStaticWebApps!; } + set { Initialize(); AssignOrReplace(ref _azureStaticWebApps, value); } + } + private AppServiceStaticWebAppsProvider? _azureStaticWebApps; + + /// + /// The map of the name of the alias of each custom Open ID Connect + /// provider to the configuration settings of the custom Open + /// ID Connect provider. + /// + public BicepDictionary CustomOpenIdConnectProviders + { + get { Initialize(); return _customOpenIdConnectProviders!; } + set { Initialize(); _customOpenIdConnectProviders!.Assign(value); } + } + private BicepDictionary? _customOpenIdConnectProviders; + + /// + /// Creates a new AppServiceIdentityProviders. + /// + public AppServiceIdentityProviders() + { + } + + /// + /// Define all the provisionable properties of AppServiceIdentityProviders. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _azureActiveDirectory = DefineModelProperty("AzureActiveDirectory", ["azureActiveDirectory"]); + _facebook = DefineModelProperty("Facebook", ["facebook"]); + _gitHub = DefineModelProperty("GitHub", ["gitHub"]); + _google = DefineModelProperty("Google", ["google"]); + _legacyMicrosoftAccount = DefineModelProperty("LegacyMicrosoftAccount", ["legacyMicrosoftAccount"]); + _twitter = DefineModelProperty("Twitter", ["twitter"]); + _apple = DefineModelProperty("Apple", ["apple"]); + _azureStaticWebApps = DefineModelProperty("AzureStaticWebApps", ["azureStaticWebApps"]); + _customOpenIdConnectProviders = DefineDictionaryProperty("CustomOpenIdConnectProviders", ["customOpenIdConnectProviders"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceStaticWebAppsProvider.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceStaticWebAppsProvider.cs new file mode 100644 index 000000000000..5ed2677805a9 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceStaticWebAppsProvider.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Azure Static Web Apps provider. +/// +public partial class AppServiceStaticWebAppsProvider : ProvisionableConstruct +{ + /// + /// <code>false</code> if the Azure Static Web Apps provider + /// should not be enabled despite the set registration; otherwise, + /// <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The Client ID of the app used for login. + /// + public BicepValue RegistrationClientId + { + get { Initialize(); return _registrationClientId!; } + set { Initialize(); _registrationClientId!.Assign(value); } + } + private BicepValue? _registrationClientId; + + /// + /// Creates a new AppServiceStaticWebAppsProvider. + /// + public AppServiceStaticWebAppsProvider() + { + } + + /// + /// Define all the provisionable properties of + /// AppServiceStaticWebAppsProvider. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registrationClientId = DefineProperty("RegistrationClientId", ["registration", "clientId"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTokenStore.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTokenStore.cs new file mode 100644 index 000000000000..a9e8c96f5744 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTokenStore.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the token store. +/// +public partial class AppServiceTokenStore : ProvisionableConstruct +{ + /// + /// <code>true</code> to durably store platform-specific + /// security tokens that are obtained during login flows; otherwise, + /// <code>false</code>. The default is + /// <code>false</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The number of hours after session token expiration that a session token + /// can be used to call the token refresh API. The default is + /// 72 hours. + /// + public BicepValue TokenRefreshExtensionHours + { + get { Initialize(); return _tokenRefreshExtensionHours!; } + set { Initialize(); _tokenRefreshExtensionHours!.Assign(value); } + } + private BicepValue? _tokenRefreshExtensionHours; + + /// + /// The directory in which the tokens will be stored. + /// + public BicepValue FileSystemDirectory + { + get { Initialize(); return _fileSystemDirectory!; } + set { Initialize(); _fileSystemDirectory!.Assign(value); } + } + private BicepValue? _fileSystemDirectory; + + /// + /// The name of the app setting containing the SAS URL of the blob storage + /// containing the tokens. + /// + public BicepValue AzureBlobStorageSasUrlSettingName + { + get { Initialize(); return _azureBlobStorageSasUrlSettingName!; } + set { Initialize(); _azureBlobStorageSasUrlSettingName!.Assign(value); } + } + private BicepValue? _azureBlobStorageSasUrlSettingName; + + /// + /// Creates a new AppServiceTokenStore. + /// + public AppServiceTokenStore() + { + } + + /// + /// Define all the provisionable properties of AppServiceTokenStore. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _tokenRefreshExtensionHours = DefineProperty("TokenRefreshExtensionHours", ["tokenRefreshExtensionHours"]); + _fileSystemDirectory = DefineProperty("FileSystemDirectory", ["fileSystem", "directory"]); + _azureBlobStorageSasUrlSettingName = DefineProperty("AzureBlobStorageSasUrlSettingName", ["azureBlobStorage", "sasUrlSettingName"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTwitterProvider.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTwitterProvider.cs new file mode 100644 index 000000000000..1a8ac203f07f --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AppServiceTwitterProvider.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Twitter provider. +/// +public partial class AppServiceTwitterProvider : ProvisionableConstruct +{ + /// + /// <code>false</code> if the Twitter provider should not be + /// enabled despite the set registration; otherwise, + /// <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The configuration settings of the app registration for the Twitter + /// provider. + /// + public TwitterRegistration Registration + { + get { Initialize(); return _registration!; } + set { Initialize(); AssignOrReplace(ref _registration, value); } + } + private TwitterRegistration? _registration; + + /// + /// Creates a new AppServiceTwitterProvider. + /// + public AppServiceTwitterProvider() + { + } + + /// + /// Define all the provisionable properties of AppServiceTwitterProvider. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registration = DefineModelProperty("Registration", ["registration"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AuthPlatform.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AuthPlatform.cs new file mode 100644 index 000000000000..fb2ddb50be4d --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/AuthPlatform.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the platform of App Service +/// Authentication/Authorization. +/// +public partial class AuthPlatform : ProvisionableConstruct +{ + /// + /// <code>true</code> if the Authentication / Authorization + /// feature is enabled for the current app; otherwise, + /// <code>false</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The RuntimeVersion of the Authentication / Authorization feature in use + /// for the current app. The setting in this value can control + /// the behavior of certain features in the Authentication / Authorization + /// module. + /// + public BicepValue RuntimeVersion + { + get { Initialize(); return _runtimeVersion!; } + set { Initialize(); _runtimeVersion!.Assign(value); } + } + private BicepValue? _runtimeVersion; + + /// + /// The path of the config file containing auth settings if they come from + /// a file. If the path is relative, base will the site's + /// root directory. + /// + public BicepValue ConfigFilePath + { + get { Initialize(); return _configFilePath!; } + set { Initialize(); _configFilePath!.Assign(value); } + } + private BicepValue? _configFilePath; + + /// + /// Creates a new AuthPlatform. + /// + public AuthPlatform() + { + } + + /// + /// Define all the provisionable properties of AuthPlatform. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _runtimeVersion = DefineProperty("RuntimeVersion", ["runtimeVersion"]); + _configFilePath = DefineProperty("ConfigFilePath", ["configFilePath"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ClientCredentialMethod.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ClientCredentialMethod.cs new file mode 100644 index 000000000000..448686ed3ec7 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ClientCredentialMethod.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +namespace Azure.Provisioning.AppService; + +/// +/// The method that should be used to authenticate the user. +/// +public enum ClientCredentialMethod +{ + /// + /// ClientSecretPost. + /// + ClientSecretPost, +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ClientRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ClientRegistration.cs new file mode 100644 index 000000000000..02d074e92cee --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ClientRegistration.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the app registration for providers that have +/// client ids and client secrets. +/// +public partial class ClientRegistration : ProvisionableConstruct +{ + /// + /// The Client ID of the app used for login. + /// + public BicepValue ClientId + { + get { Initialize(); return _clientId!; } + set { Initialize(); _clientId!.Assign(value); } + } + private BicepValue? _clientId; + + /// + /// The app setting name that contains the client secret. + /// + public BicepValue ClientSecretSettingName + { + get { Initialize(); return _clientSecretSettingName!; } + set { Initialize(); _clientSecretSettingName!.Assign(value); } + } + private BicepValue? _clientSecretSettingName; + + /// + /// Creates a new ClientRegistration. + /// + public ClientRegistration() + { + } + + /// + /// Define all the provisionable properties of ClientRegistration. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _clientId = DefineProperty("ClientId", ["clientId"]); + _clientSecretSettingName = DefineProperty("ClientSecretSettingName", ["clientSecretSettingName"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CookieExpirationConvention.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CookieExpirationConvention.cs new file mode 100644 index 000000000000..ae618f3296b3 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CookieExpirationConvention.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +namespace Azure.Provisioning.AppService; + +/// +/// The convention used when determining the session cookie's expiration. +/// +public enum CookieExpirationConvention +{ + /// + /// FixedTime. + /// + FixedTime, + + /// + /// IdentityProviderDerived. + /// + IdentityProviderDerived, +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CustomOpenIdConnectProvider.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CustomOpenIdConnectProvider.cs new file mode 100644 index 000000000000..d538e0b007ff --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/CustomOpenIdConnectProvider.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the custom Open ID Connect provider. +/// +public partial class CustomOpenIdConnectProvider : ProvisionableConstruct +{ + /// + /// <code>false</code> if the custom Open ID provider provider + /// should not be enabled; otherwise, <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The configuration settings of the app registration for the custom Open + /// ID Connect provider. + /// + public OpenIdConnectRegistration Registration + { + get { Initialize(); return _registration!; } + set { Initialize(); AssignOrReplace(ref _registration, value); } + } + private OpenIdConnectRegistration? _registration; + + /// + /// The configuration settings of the login flow of the custom Open ID + /// Connect provider. + /// + public OpenIdConnectLogin Login + { + get { Initialize(); return _login!; } + set { Initialize(); AssignOrReplace(ref _login, value); } + } + private OpenIdConnectLogin? _login; + + /// + /// Creates a new CustomOpenIdConnectProvider. + /// + public CustomOpenIdConnectProvider() + { + } + + /// + /// Define all the provisionable properties of CustomOpenIdConnectProvider. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registration = DefineModelProperty("Registration", ["registration"]); + _login = DefineModelProperty("Login", ["login"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/DefaultAuthorizationPolicy.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/DefaultAuthorizationPolicy.cs new file mode 100644 index 000000000000..018ce371ca7a --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/DefaultAuthorizationPolicy.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the Azure Active Directory default +/// authorization policy. +/// +public partial class DefaultAuthorizationPolicy : ProvisionableConstruct +{ + /// + /// The configuration settings of the Azure Active Directory allowed + /// principals. + /// + public AppServiceAadAllowedPrincipals AllowedPrincipals + { + get { Initialize(); return _allowedPrincipals!; } + set { Initialize(); AssignOrReplace(ref _allowedPrincipals, value); } + } + private AppServiceAadAllowedPrincipals? _allowedPrincipals; + + /// + /// The configuration settings of the Azure Active Directory allowed + /// applications. + /// + public BicepList AllowedApplications + { + get { Initialize(); return _allowedApplications!; } + set { Initialize(); _allowedApplications!.Assign(value); } + } + private BicepList? _allowedApplications; + + /// + /// Creates a new DefaultAuthorizationPolicy. + /// + public DefaultAuthorizationPolicy() + { + } + + /// + /// Define all the provisionable properties of DefaultAuthorizationPolicy. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _allowedPrincipals = DefineModelProperty("AllowedPrincipals", ["allowedPrincipals"]); + _allowedApplications = DefineListProperty("AllowedApplications", ["allowedApplications"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ForwardProxyConvention.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ForwardProxyConvention.cs new file mode 100644 index 000000000000..9a2a0554cef9 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/ForwardProxyConvention.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +namespace Azure.Provisioning.AppService; + +/// +/// The convention used to determine the url of the request made. +/// +public enum ForwardProxyConvention +{ + /// + /// NoProxy. + /// + NoProxy, + + /// + /// Standard. + /// + Standard, + + /// + /// Custom. + /// + Custom, +} 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 fab239e0ad27..e48b0b305833 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs @@ -16,18 +16,6 @@ namespace Azure.Provisioning.AppService; /// public partial class FunctionAppAlwaysReadyConfig : ProvisionableConstruct { - /// - /// Sets the number of 'Always Ready' instances for a given - /// function group or a specific function. For additional information see - /// https://aka.ms/flexconsumption/alwaysready. - /// - public BicepValue InstanceCount - { - get { Initialize(); return _instanceCount!; } - set { Initialize(); _instanceCount!.Assign(value); } - } - private BicepValue? _instanceCount; - /// /// Either a function group or a function name is required. For additional /// information see https://aka.ms/flexconsumption/alwaysready. 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 d29c1ae035e1..be794264cc00 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs @@ -16,37 +16,6 @@ namespace Azure.Provisioning.AppService; /// public partial class FunctionAppScaleAndConcurrency : ProvisionableConstruct { - /// - /// The maximum number of instances for the function app. - /// - public BicepValue MaximumInstanceCount - { - get { Initialize(); return _maximumInstanceCount!; } - set { Initialize(); _maximumInstanceCount!.Assign(value); } - } - private BicepValue? _maximumInstanceCount; - - /// - /// Set the amount of memory allocated to each instance of the function app - /// in MB. CPU and network bandwidth are allocated proportionally. - /// - public BicepValue InstanceMemoryMB - { - get { Initialize(); return _instanceMemoryMB!; } - set { Initialize(); _instanceMemoryMB!.Assign(value); } - } - private BicepValue? _instanceMemoryMB; - - /// - /// The maximum number of concurrent HTTP trigger invocations per instance. - /// - public BicepValue HttpPerInstanceConcurrency - { - get { Initialize(); return _httpPerInstanceConcurrency!; } - set { Initialize(); _httpPerInstanceConcurrency!.Assign(value); } - } - private BicepValue? _httpPerInstanceConcurrency; - /// /// 'Always Ready' configuration for the function app. /// diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GlobalValidation.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GlobalValidation.cs new file mode 100644 index 000000000000..58be9bbf7b17 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/GlobalValidation.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings that determines the validation flow of users +/// using App Service Authentication/Authorization. +/// +public partial class GlobalValidation : ProvisionableConstruct +{ + /// + /// <code>true</code> if the authentication flow is required + /// any request is made; otherwise, <code>false</code>. + /// + public BicepValue IsAuthenticationRequired + { + get { Initialize(); return _isAuthenticationRequired!; } + set { Initialize(); _isAuthenticationRequired!.Assign(value); } + } + private BicepValue? _isAuthenticationRequired; + + /// + /// The action to take when an unauthenticated client attempts to access + /// the app. + /// + public BicepValue UnauthenticatedClientAction + { + get { Initialize(); return _unauthenticatedClientAction!; } + set { Initialize(); _unauthenticatedClientAction!.Assign(value); } + } + private BicepValue? _unauthenticatedClientAction; + + /// + /// The default authentication provider to use when multiple providers are + /// configured. This setting is only needed if multiple + /// providers are configured and the unauthenticated client + /// action is set to "RedirectToLoginPage". + /// + public BicepValue RedirectToProvider + { + get { Initialize(); return _redirectToProvider!; } + set { Initialize(); _redirectToProvider!.Assign(value); } + } + private BicepValue? _redirectToProvider; + + /// + /// The paths for which unauthenticated flow would not be redirected to the + /// login page. + /// + public BicepList ExcludedPaths + { + get { Initialize(); return _excludedPaths!; } + set { Initialize(); _excludedPaths!.Assign(value); } + } + private BicepList? _excludedPaths; + + /// + /// Creates a new GlobalValidation. + /// + public GlobalValidation() + { + } + + /// + /// Define all the provisionable properties of GlobalValidation. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isAuthenticationRequired = DefineProperty("IsAuthenticationRequired", ["requireAuthentication"]); + _unauthenticatedClientAction = DefineProperty("UnauthenticatedClientAction", ["unauthenticatedClientAction"]); + _redirectToProvider = DefineProperty("RedirectToProvider", ["redirectToProvider"]); + _excludedPaths = DefineListProperty("ExcludedPaths", ["excludedPaths"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/JwtClaimChecks.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/JwtClaimChecks.cs new file mode 100644 index 000000000000..986d0000943f --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/JwtClaimChecks.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the checks that should be made while +/// validating the JWT Claims. +/// +public partial class JwtClaimChecks : ProvisionableConstruct +{ + /// + /// The list of the allowed groups. + /// + public BicepList AllowedGroups + { + get { Initialize(); return _allowedGroups!; } + set { Initialize(); _allowedGroups!.Assign(value); } + } + private BicepList? _allowedGroups; + + /// + /// The list of the allowed client applications. + /// + public BicepList AllowedClientApplications + { + get { Initialize(); return _allowedClientApplications!; } + set { Initialize(); _allowedClientApplications!.Assign(value); } + } + private BicepList? _allowedClientApplications; + + /// + /// Creates a new JwtClaimChecks. + /// + public JwtClaimChecks() + { + } + + /// + /// Define all the provisionable properties of JwtClaimChecks. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _allowedGroups = DefineListProperty("AllowedGroups", ["allowedGroups"]); + _allowedClientApplications = DefineListProperty("AllowedClientApplications", ["allowedClientApplications"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LegacyMicrosoftAccount.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LegacyMicrosoftAccount.cs new file mode 100644 index 000000000000..bb41b83d284e --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LegacyMicrosoftAccount.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the legacy Microsoft Account provider. +/// +public partial class LegacyMicrosoftAccount : ProvisionableConstruct +{ + /// + /// <code>false</code> if the legacy Microsoft Account provider + /// should not be enabled despite the set registration; otherwise, + /// <code>true</code>. + /// + public BicepValue IsEnabled + { + get { Initialize(); return _isEnabled!; } + set { Initialize(); _isEnabled!.Assign(value); } + } + private BicepValue? _isEnabled; + + /// + /// The configuration settings of the app registration for the legacy + /// Microsoft Account provider. + /// + public ClientRegistration Registration + { + get { Initialize(); return _registration!; } + set { Initialize(); AssignOrReplace(ref _registration, value); } + } + private ClientRegistration? _registration; + + /// + /// A list of the scopes that should be requested while authenticating. + /// + public BicepList LoginScopes + { + get { Initialize(); return _loginScopes!; } + set { Initialize(); _loginScopes!.Assign(value); } + } + private BicepList? _loginScopes; + + /// + /// The configuration settings of the allowed list of audiences from which + /// to validate the JWT token. + /// + public BicepList ValidationAllowedAudiences + { + get { Initialize(); return _validationAllowedAudiences!; } + set { Initialize(); _validationAllowedAudiences!.Assign(value); } + } + private BicepList? _validationAllowedAudiences; + + /// + /// Creates a new LegacyMicrosoftAccount. + /// + public LegacyMicrosoftAccount() + { + } + + /// + /// Define all the provisionable properties of LegacyMicrosoftAccount. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isEnabled = DefineProperty("IsEnabled", ["enabled"]); + _registration = DefineModelProperty("Registration", ["registration"]); + _loginScopes = DefineListProperty("LoginScopes", ["login", "scopes"]); + _validationAllowedAudiences = DefineListProperty("ValidationAllowedAudiences", ["validation", "allowedAudiences"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LoginFlowNonceSettings.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LoginFlowNonceSettings.cs new file mode 100644 index 000000000000..a15cb6118774 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/LoginFlowNonceSettings.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the nonce used in the login flow. +/// +public partial class LoginFlowNonceSettings : ProvisionableConstruct +{ + /// + /// <code>false</code> if the nonce should not be validated + /// while completing the login flow; otherwise, + /// <code>true</code>. + /// + public BicepValue ValidateNonce + { + get { Initialize(); return _validateNonce!; } + set { Initialize(); _validateNonce!.Assign(value); } + } + private BicepValue? _validateNonce; + + /// + /// The time after the request is made when the nonce should expire. + /// + public BicepValue NonceExpirationInterval + { + get { Initialize(); return _nonceExpirationInterval!; } + set { Initialize(); _nonceExpirationInterval!.Assign(value); } + } + private BicepValue? _nonceExpirationInterval; + + /// + /// Creates a new LoginFlowNonceSettings. + /// + public LoginFlowNonceSettings() + { + } + + /// + /// Define all the provisionable properties of LoginFlowNonceSettings. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _validateNonce = DefineProperty("ValidateNonce", ["validateNonce"]); + _nonceExpirationInterval = DefineProperty("NonceExpirationInterval", ["nonceExpirationInterval"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectClientCredential.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectClientCredential.cs new file mode 100644 index 000000000000..b5a1d761d799 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectClientCredential.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The authentication client credentials of the custom Open ID Connect +/// provider. +/// +public partial class OpenIdConnectClientCredential : ProvisionableConstruct +{ + /// + /// The method that should be used to authenticate the user. + /// + public BicepValue Method + { + get { Initialize(); return _method!; } + set { Initialize(); _method!.Assign(value); } + } + private BicepValue? _method; + + /// + /// The app setting that contains the client secret for the custom Open ID + /// Connect provider. + /// + public BicepValue ClientSecretSettingName + { + get { Initialize(); return _clientSecretSettingName!; } + set { Initialize(); _clientSecretSettingName!.Assign(value); } + } + private BicepValue? _clientSecretSettingName; + + /// + /// Creates a new OpenIdConnectClientCredential. + /// + public OpenIdConnectClientCredential() + { + } + + /// + /// Define all the provisionable properties of + /// OpenIdConnectClientCredential. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _method = DefineProperty("Method", ["method"]); + _clientSecretSettingName = DefineProperty("ClientSecretSettingName", ["clientSecretSettingName"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectConfig.cs new file mode 100644 index 000000000000..e49ab96cc30d --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectConfig.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the endpoints used for the custom Open ID +/// Connect provider. +/// +public partial class OpenIdConnectConfig : ProvisionableConstruct +{ + /// + /// The endpoint to be used to make an authorization request. + /// + public BicepValue AuthorizationEndpoint + { + get { Initialize(); return _authorizationEndpoint!; } + set { Initialize(); _authorizationEndpoint!.Assign(value); } + } + private BicepValue? _authorizationEndpoint; + + /// + /// The endpoint to be used to request a token. + /// + public BicepValue TokenEndpoint + { + get { Initialize(); return _tokenEndpoint!; } + set { Initialize(); _tokenEndpoint!.Assign(value); } + } + private BicepValue? _tokenEndpoint; + + /// + /// The endpoint that issues the token. + /// + public BicepValue Issuer + { + get { Initialize(); return _issuer!; } + set { Initialize(); _issuer!.Assign(value); } + } + private BicepValue? _issuer; + + /// + /// The endpoint that provides the keys necessary to validate the token. + /// + public BicepValue CertificationUri + { + get { Initialize(); return _certificationUri!; } + set { Initialize(); _certificationUri!.Assign(value); } + } + private BicepValue? _certificationUri; + + /// + /// The endpoint that contains all the configuration endpoints for the + /// provider. + /// + public BicepValue WellKnownOpenIdConfiguration + { + get { Initialize(); return _wellKnownOpenIdConfiguration!; } + set { Initialize(); _wellKnownOpenIdConfiguration!.Assign(value); } + } + private BicepValue? _wellKnownOpenIdConfiguration; + + /// + /// Creates a new OpenIdConnectConfig. + /// + public OpenIdConnectConfig() + { + } + + /// + /// Define all the provisionable properties of OpenIdConnectConfig. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _authorizationEndpoint = DefineProperty("AuthorizationEndpoint", ["authorizationEndpoint"]); + _tokenEndpoint = DefineProperty("TokenEndpoint", ["tokenEndpoint"]); + _issuer = DefineProperty("Issuer", ["issuer"]); + _certificationUri = DefineProperty("CertificationUri", ["certificationUri"]); + _wellKnownOpenIdConfiguration = DefineProperty("WellKnownOpenIdConfiguration", ["wellKnownOpenIdConfiguration"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectLogin.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectLogin.cs new file mode 100644 index 000000000000..462d00dd509e --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectLogin.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the login flow of the custom Open ID Connect +/// provider. +/// +public partial class OpenIdConnectLogin : ProvisionableConstruct +{ + /// + /// The name of the claim that contains the users name. + /// + public BicepValue NameClaimType + { + get { Initialize(); return _nameClaimType!; } + set { Initialize(); _nameClaimType!.Assign(value); } + } + private BicepValue? _nameClaimType; + + /// + /// A list of the scopes that should be requested while authenticating. + /// + public BicepList Scopes + { + get { Initialize(); return _scopes!; } + set { Initialize(); _scopes!.Assign(value); } + } + private BicepList? _scopes; + + /// + /// Creates a new OpenIdConnectLogin. + /// + public OpenIdConnectLogin() + { + } + + /// + /// Define all the provisionable properties of OpenIdConnectLogin. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _nameClaimType = DefineProperty("NameClaimType", ["nameClaimType"]); + _scopes = DefineListProperty("Scopes", ["scopes"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectRegistration.cs new file mode 100644 index 000000000000..da64b6536d90 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OpenIdConnectRegistration.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the app registration for the custom Open ID +/// Connect provider. +/// +public partial class OpenIdConnectRegistration : ProvisionableConstruct +{ + /// + /// The client id of the custom Open ID Connect provider. + /// + public BicepValue ClientId + { + get { Initialize(); return _clientId!; } + set { Initialize(); _clientId!.Assign(value); } + } + private BicepValue? _clientId; + + /// + /// The authentication credentials of the custom Open ID Connect provider. + /// + public OpenIdConnectClientCredential ClientCredential + { + get { Initialize(); return _clientCredential!; } + set { Initialize(); AssignOrReplace(ref _clientCredential, value); } + } + private OpenIdConnectClientCredential? _clientCredential; + + /// + /// The configuration settings of the endpoints used for the custom Open ID + /// Connect provider. + /// + public OpenIdConnectConfig OpenIdConnectConfiguration + { + get { Initialize(); return _openIdConnectConfiguration!; } + set { Initialize(); AssignOrReplace(ref _openIdConnectConfiguration, value); } + } + private OpenIdConnectConfig? _openIdConnectConfiguration; + + /// + /// Creates a new OpenIdConnectRegistration. + /// + public OpenIdConnectRegistration() + { + } + + /// + /// Define all the provisionable properties of OpenIdConnectRegistration. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _clientId = DefineProperty("ClientId", ["clientId"]); + _clientCredential = DefineModelProperty("ClientCredential", ["clientCredential"]); + _openIdConnectConfiguration = DefineModelProperty("OpenIdConnectConfiguration", ["openIdConnectConfiguration"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OutboundVnetRouting.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OutboundVnetRouting.cs new file mode 100644 index 000000000000..c2a688a0c546 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/OutboundVnetRouting.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// Outbound traffic options over virtual network. +/// +public partial class OutboundVnetRouting : ProvisionableConstruct +{ + /// + /// Enables all other routing options defined in OutboundVnetRouting if + /// this setting is set to true. + /// + public BicepValue IsAllTrafficEnabled + { + get { Initialize(); return _isAllTrafficEnabled!; } + set { Initialize(); _isAllTrafficEnabled!.Assign(value); } + } + private BicepValue? _isAllTrafficEnabled; + + /// + /// This causes all outbound traffic to have Virtual Network Security + /// Groups and User Defined Routes applied. Previously called + /// VnetRouteAllEnabled. + /// + public BicepValue IsApplicationTrafficEnabled + { + get { Initialize(); return _isApplicationTrafficEnabled!; } + set { Initialize(); _isApplicationTrafficEnabled!.Assign(value); } + } + private BicepValue? _isApplicationTrafficEnabled; + + /// + /// Enables accessing content over virtual network. Previously called + /// VnetContentShareEnabled. + /// + public BicepValue IsContentShareTrafficEnabled + { + get { Initialize(); return _isContentShareTrafficEnabled!; } + set { Initialize(); _isContentShareTrafficEnabled!.Assign(value); } + } + private BicepValue? _isContentShareTrafficEnabled; + + /// + /// Enables pulling image over Virtual Network. Previously called + /// VnetImagePullEnabled. + /// + public BicepValue IsImagePullTrafficEnabled + { + get { Initialize(); return _isImagePullTrafficEnabled!; } + set { Initialize(); _isImagePullTrafficEnabled!.Assign(value); } + } + private BicepValue? _isImagePullTrafficEnabled; + + /// + /// Enables Backup and Restore operations over virtual network. Previously + /// called VnetBackupRestoreEnabled. + /// + public BicepValue IsBackupRestoreTrafficEnabled + { + get { Initialize(); return _isBackupRestoreTrafficEnabled!; } + set { Initialize(); _isBackupRestoreTrafficEnabled!.Assign(value); } + } + private BicepValue? _isBackupRestoreTrafficEnabled; + + /// + /// Creates a new OutboundVnetRouting. + /// + public OutboundVnetRouting() + { + } + + /// + /// Define all the provisionable properties of OutboundVnetRouting. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _isAllTrafficEnabled = DefineProperty("IsAllTrafficEnabled", ["allTraffic"]); + _isApplicationTrafficEnabled = DefineProperty("IsApplicationTrafficEnabled", ["applicationTraffic"]); + _isContentShareTrafficEnabled = DefineProperty("IsContentShareTrafficEnabled", ["contentShareTraffic"]); + _isImagePullTrafficEnabled = DefineProperty("IsImagePullTrafficEnabled", ["imagePullTraffic"]); + _isBackupRestoreTrafficEnabled = DefineProperty("IsBackupRestoreTrafficEnabled", ["backupRestoreTraffic"]); + } +} 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 80c4f25a02c6..9f3068abd755 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RampUpRule.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/RampUpRule.cs @@ -88,9 +88,7 @@ public BicepValue MaxReroutePercentage /// /// Custom decision algorithm can be provided in TiPCallback site extension - /// which URL can be specified. See TiPCallback site extension for the - /// scaffold and contracts. - /// https://www.siteextensions.net/packages/TiPCallback/ + /// which URL can be specified. /// public BicepValue ChangeDecisionCallbackUri { 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 b399a21fc4fc..778003d4e9e4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteConfigProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/SiteConfigProperties.cs @@ -213,7 +213,9 @@ public BicepValue PublishingUsername private BicepValue? _publishingUsername; /// - /// Application settings. + /// Application settings. This property is not returned in response to + /// normal create and read requests since it may contain sensitive + /// information. /// public BicepList AppSettings { @@ -234,7 +236,8 @@ public BicepList Metadata private BicepList? _metadata; /// - /// Connection strings. + /// Connection strings. This property is not returned in response to normal + /// create and read requests since it may contain sensitive information. /// public BicepList ConnectionStrings { @@ -620,6 +623,18 @@ public BicepValue IsHttp20Enabled } private BicepValue? _isHttp20Enabled; + /// + /// Http20ProxyFlag: Configures a website to allow http2.0 to pass be + /// proxied all the way to the app. 0 = disabled, 1 = pass through all + /// http2 traffic, 2 = pass through gRPC only. + /// + public BicepValue Http20ProxyFlag + { + get { Initialize(); return _http20ProxyFlag!; } + set { Initialize(); _http20ProxyFlag!.Assign(value); } + } + private BicepValue? _http20ProxyFlag; + /// /// MinTlsVersion: configures the minimum version of TLS required for SSL /// requests. @@ -840,6 +855,7 @@ protected override void DefineProvisionableProperties() _scmIPSecurityRestrictionsDefaultAction = DefineProperty("ScmIPSecurityRestrictionsDefaultAction", ["scmIpSecurityRestrictionsDefaultAction"]); _allowIPSecurityRestrictionsForScmToUseMain = DefineProperty("AllowIPSecurityRestrictionsForScmToUseMain", ["scmIpSecurityRestrictionsUseMain"]); _isHttp20Enabled = DefineProperty("IsHttp20Enabled", ["http20Enabled"]); + _http20ProxyFlag = DefineProperty("Http20ProxyFlag", ["http20ProxyFlag"]); _minTlsVersion = DefineProperty("MinTlsVersion", ["minTlsVersion"]); _minTlsCipherSuite = DefineProperty("MinTlsCipherSuite", ["minTlsCipherSuite"]); _scmMinTlsVersion = DefineProperty("ScmMinTlsVersion", ["scmMinTlsVersion"]); diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/TwitterRegistration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/TwitterRegistration.cs new file mode 100644 index 000000000000..82029afd9029 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/TwitterRegistration.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the app registration for the Twitter provider. +/// +public partial class TwitterRegistration : ProvisionableConstruct +{ + /// + /// The OAuth 1.0a consumer key of the Twitter application used for + /// sign-in. This setting is required for enabling Twitter + /// Sign-In. Twitter Sign-In documentation: + /// https://dev.twitter.com/web/sign-in + /// + public BicepValue ConsumerKey + { + get { Initialize(); return _consumerKey!; } + set { Initialize(); _consumerKey!.Assign(value); } + } + private BicepValue? _consumerKey; + + /// + /// The app setting name that contains the OAuth 1.0a consumer secret of + /// the Twitter application used for sign-in. + /// + public BicepValue ConsumerSecretSettingName + { + get { Initialize(); return _consumerSecretSettingName!; } + set { Initialize(); _consumerSecretSettingName!.Assign(value); } + } + private BicepValue? _consumerSecretSettingName; + + /// + /// Creates a new TwitterRegistration. + /// + public TwitterRegistration() + { + } + + /// + /// Define all the provisionable properties of TwitterRegistration. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _consumerKey = DefineProperty("ConsumerKey", ["consumerKey"]); + _consumerSecretSettingName = DefineProperty("ConsumerSecretSettingName", ["consumerSecretSettingName"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/UnauthenticatedClientActionV2.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/UnauthenticatedClientActionV2.cs new file mode 100644 index 000000000000..f6c1b93b4fd1 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/UnauthenticatedClientActionV2.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +namespace Azure.Provisioning.AppService; + +/// +/// The action to take when an unauthenticated client attempts to access the +/// app. +/// +public enum UnauthenticatedClientActionV2 +{ + /// + /// RedirectToLoginPage. + /// + RedirectToLoginPage, + + /// + /// AllowAnonymous. + /// + AllowAnonymous, + + /// + /// Return401. + /// + Return401, + + /// + /// Return403. + /// + Return403, +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppCookieExpiration.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppCookieExpiration.cs new file mode 100644 index 000000000000..3f7565a725e4 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppCookieExpiration.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the session cookie's expiration. +/// +public partial class WebAppCookieExpiration : ProvisionableConstruct +{ + /// + /// The convention used when determining the session cookie's + /// expiration. + /// + public BicepValue Convention + { + get { Initialize(); return _convention!; } + set { Initialize(); _convention!.Assign(value); } + } + private BicepValue? _convention; + + /// + /// The time after the request is made when the session cookie should + /// expire. + /// + public BicepValue TimeToExpiration + { + get { Initialize(); return _timeToExpiration!; } + set { Initialize(); _timeToExpiration!.Assign(value); } + } + private BicepValue? _timeToExpiration; + + /// + /// Creates a new WebAppCookieExpiration. + /// + public WebAppCookieExpiration() + { + } + + /// + /// Define all the provisionable properties of WebAppCookieExpiration. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _convention = DefineProperty("Convention", ["convention"]); + _timeToExpiration = DefineProperty("TimeToExpiration", ["timeToExpiration"]); + } +} 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 6384a1d727c6..43b0468b49a3 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs @@ -26,7 +26,11 @@ public BicepValue Name private BicepValue? _name; /// - /// Environment variable value. + /// The value of this environment variable must be the name of an + /// AppSetting. The actual value of the environment variable in container + /// will be retrieved from the specified AppSetting at runtime. If the + /// AppSetting is not found, the value will be set to an empty string in + /// the container at runtime. /// public BicepValue Value { diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppLoginInfo.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppLoginInfo.cs new file mode 100644 index 000000000000..a03e2780eea7 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/Models/WebAppLoginInfo.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// The configuration settings of the login flow of users using App Service +/// Authentication/Authorization. +/// +public partial class WebAppLoginInfo : ProvisionableConstruct +{ + /// + /// The endpoint at which a logout request should be made. + /// + public BicepValue RoutesLogoutEndpoint + { + get { Initialize(); return _routesLogoutEndpoint!; } + set { Initialize(); _routesLogoutEndpoint!.Assign(value); } + } + private BicepValue? _routesLogoutEndpoint; + + /// + /// The configuration settings of the token store. + /// + public AppServiceTokenStore TokenStore + { + get { Initialize(); return _tokenStore!; } + set { Initialize(); AssignOrReplace(ref _tokenStore, value); } + } + private AppServiceTokenStore? _tokenStore; + + /// + /// <code>true</code> if the fragments from the request are + /// preserved after the login request is made; otherwise, + /// <code>false</code>. + /// + public BicepValue PreserveUrlFragmentsForLogins + { + get { Initialize(); return _preserveUrlFragmentsForLogins!; } + set { Initialize(); _preserveUrlFragmentsForLogins!.Assign(value); } + } + private BicepValue? _preserveUrlFragmentsForLogins; + + /// + /// External URLs that can be redirected to as part of logging in or + /// logging out of the app. Note that the query string part of the URL is + /// ignored. This is an advanced setting typically only needed + /// by Windows Store application backends. Note that URLs + /// within the current domain are always implicitly allowed. + /// + public BicepList AllowedExternalRedirectUrls + { + get { Initialize(); return _allowedExternalRedirectUrls!; } + set { Initialize(); _allowedExternalRedirectUrls!.Assign(value); } + } + private BicepList? _allowedExternalRedirectUrls; + + /// + /// The configuration settings of the session cookie's expiration. + /// + public WebAppCookieExpiration CookieExpiration + { + get { Initialize(); return _cookieExpiration!; } + set { Initialize(); AssignOrReplace(ref _cookieExpiration, value); } + } + private WebAppCookieExpiration? _cookieExpiration; + + /// + /// The configuration settings of the nonce used in the login flow. + /// + public LoginFlowNonceSettings Nonce + { + get { Initialize(); return _nonce!; } + set { Initialize(); AssignOrReplace(ref _nonce, value); } + } + private LoginFlowNonceSettings? _nonce; + + /// + /// Creates a new WebAppLoginInfo. + /// + public WebAppLoginInfo() + { + } + + /// + /// Define all the provisionable properties of WebAppLoginInfo. + /// + protected override void DefineProvisionableProperties() + { + base.DefineProvisionableProperties(); + _routesLogoutEndpoint = DefineProperty("RoutesLogoutEndpoint", ["routes", "logoutEndpoint"]); + _tokenStore = DefineModelProperty("TokenStore", ["tokenStore"]); + _preserveUrlFragmentsForLogins = DefineProperty("PreserveUrlFragmentsForLogins", ["preserveUrlFragmentsForLogins"]); + _allowedExternalRedirectUrls = DefineListProperty("AllowedExternalRedirectUrls", ["allowedExternalRedirectUrls"]); + _cookieExpiration = DefineModelProperty("CookieExpiration", ["cookieExpiration"]); + _nonce = DefineModelProperty("Nonce", ["nonce"]); + } +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteAuthSettingsV2.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteAuthSettingsV2.cs new file mode 100644 index 000000000000..94490adbb1d8 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteAuthSettingsV2.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Core; +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using Azure.Provisioning.Resources; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// SiteAuthSettingsV2. +/// +public partial class SiteAuthSettingsV2 : ProvisionableResource +{ + private BicepValue? _name; + + /// + /// The configuration settings that determines the validation flow of users + /// using App Service Authentication/Authorization. + /// + public GlobalValidation GlobalValidation + { + get { Initialize(); return _globalValidation!; } + set { Initialize(); AssignOrReplace(ref _globalValidation, value); } + } + private GlobalValidation? _globalValidation; + + /// + /// The configuration settings of the HTTP requests for authentication and + /// authorization requests made against App Service + /// Authentication/Authorization. + /// + public AppServiceHttpSettings HttpSettings + { + get { Initialize(); return _httpSettings!; } + set { Initialize(); AssignOrReplace(ref _httpSettings, value); } + } + private AppServiceHttpSettings? _httpSettings; + + /// + /// The configuration settings of each of the identity providers used to + /// configure App Service Authentication/Authorization. + /// + public AppServiceIdentityProviders IdentityProviders + { + get { Initialize(); return _identityProviders!; } + set { Initialize(); AssignOrReplace(ref _identityProviders, value); } + } + private AppServiceIdentityProviders? _identityProviders; + + /// + /// Kind of resource. + /// + public BicepValue Kind + { + get { Initialize(); return _kind!; } + set { Initialize(); _kind!.Assign(value); } + } + private BicepValue? _kind; + + /// + /// The configuration settings of the login flow of users using App Service + /// Authentication/Authorization. + /// + public WebAppLoginInfo Login + { + get { Initialize(); return _login!; } + set { Initialize(); AssignOrReplace(ref _login, value); } + } + private WebAppLoginInfo? _login; + + /// + /// The configuration settings of the platform of App Service + /// Authentication/Authorization. + /// + public AuthPlatform Platform + { + get { Initialize(); return _platform!; } + set { Initialize(); AssignOrReplace(ref _platform, value); } + } + private AuthPlatform? _platform; + + /// + /// Gets the Id. + /// + public BicepValue Id + { + get { Initialize(); return _id!; } + } + private BicepValue? _id; + + /// + /// Gets the SystemData. + /// + public SystemData SystemData + { + get { Initialize(); return _systemData!; } + } + private SystemData? _systemData; + + /// + /// Get the default value for the Name property. + /// + private partial BicepValue GetNameDefaultValue(); + + /// + /// Creates a new SiteAuthSettingsV2. + /// + /// + /// The the Bicep identifier name of the SiteAuthSettingsV2 resource. This + /// can be used to refer to the resource in expressions, but is not the + /// Azure name of the resource. This value can contain letters, numbers, + /// and underscores. + /// + /// Version of the SiteAuthSettingsV2. + public SiteAuthSettingsV2(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/config", resourceVersion) + { + } + + /// + /// Define all the provisionable properties of SiteAuthSettingsV2. + /// + protected override void DefineProvisionableProperties() + { + _name = DefineProperty("Name", ["name"], defaultValue: GetNameDefaultValue()); + _globalValidation = DefineModelProperty("GlobalValidation", ["properties", "globalValidation"]); + _httpSettings = DefineModelProperty("HttpSettings", ["properties", "httpSettings"]); + _identityProviders = DefineModelProperty("IdentityProviders", ["properties", "identityProviders"]); + _kind = DefineProperty("Kind", ["kind"]); + _login = DefineModelProperty("Login", ["properties", "login"]); + _platform = DefineModelProperty("Platform", ["properties", "platform"]); + _id = DefineProperty("Id", ["id"], isOutput: true); + _systemData = DefineModelProperty("SystemData", ["systemData"], isOutput: true); + } + + /// + /// Creates a reference to an existing SiteAuthSettingsV2. + /// + /// + /// The the Bicep identifier name of the SiteAuthSettingsV2 resource. This + /// can be used to refer to the resource in expressions, but is not the + /// Azure name of the resource. This value can contain letters, numbers, + /// and underscores. + /// + /// Version of the SiteAuthSettingsV2. + /// The existing SiteAuthSettingsV2 resource. + public static SiteAuthSettingsV2 FromExisting(string bicepIdentifier, string? resourceVersion = default) => + new(bicepIdentifier, resourceVersion) { IsExistingResource = true }; +} diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteCertificate.cs new file mode 100644 index 000000000000..e5b3f78d6226 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteCertificate.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Core; +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using Azure.Provisioning.Resources; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// SiteCertificate. +/// +public partial class SiteCertificate : ProvisionableResource +{ + /// + /// Name of the certificate. + /// + public BicepValue Name + { + get { Initialize(); return _name!; } + set { Initialize(); _name!.Assign(value); } + } + private BicepValue? _name; + + /// + /// Gets or sets the Location. + /// + public BicepValue Location + { + get { Initialize(); return _location!; } + set { Initialize(); _location!.Assign(value); } + } + private BicepValue? _location; + + /// + /// CNAME of the certificate to be issued via free certificate. + /// + public BicepValue CanonicalName + { + get { Initialize(); return _canonicalName!; } + set { Initialize(); _canonicalName!.Assign(value); } + } + private BicepValue? _canonicalName; + + /// + /// Method of domain validation for free cert. + /// + public BicepValue DomainValidationMethod + { + get { Initialize(); return _domainValidationMethod!; } + set { Initialize(); _domainValidationMethod!.Assign(value); } + } + private BicepValue? _domainValidationMethod; + + /// + /// Host names the certificate applies to. + /// + public BicepList HostNames + { + get { Initialize(); return _hostNames!; } + set { Initialize(); _hostNames!.Assign(value); } + } + private BicepList? _hostNames; + + /// + /// Azure Key Vault Csm resource Id. + /// + public BicepValue KeyVaultId + { + get { Initialize(); return _keyVaultId!; } + set { Initialize(); _keyVaultId!.Assign(value); } + } + private BicepValue? _keyVaultId; + + /// + /// Azure Key Vault secret name. + /// + public BicepValue KeyVaultSecretName + { + get { Initialize(); return _keyVaultSecretName!; } + set { Initialize(); _keyVaultSecretName!.Assign(value); } + } + private BicepValue? _keyVaultSecretName; + + /// + /// Kind of resource. If the resource is an app, you can refer to + /// https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference + /// for details supported values for kind. + /// + public BicepValue Kind + { + get { Initialize(); return _kind!; } + set { Initialize(); _kind!.Assign(value); } + } + private BicepValue? _kind; + + /// + /// Certificate password. + /// + public BicepValue Password + { + get { Initialize(); return _password!; } + set { Initialize(); _password!.Assign(value); } + } + private BicepValue? _password; + + /// + /// Pfx blob. + /// + public BicepValue PfxBlob + { + get { Initialize(); return _pfxBlob!; } + set { Initialize(); _pfxBlob!.Assign(value); } + } + private BicepValue? _pfxBlob; + + /// + /// Resource ID of the associated App Service plan. + /// + public BicepValue ServerFarmId + { + get { Initialize(); return _serverFarmId!; } + set { Initialize(); _serverFarmId!.Assign(value); } + } + private BicepValue? _serverFarmId; + + /// + /// Gets or sets the Tags. + /// + public BicepDictionary Tags + { + get { Initialize(); return _tags!; } + set { Initialize(); _tags!.Assign(value); } + } + private BicepDictionary? _tags; + + /// + /// Raw bytes of .cer file. + /// + public BicepValue CerBlob + { + get { Initialize(); return _cerBlob!; } + } + private BicepValue? _cerBlob; + + /// + /// Certificate expiration date. + /// + public BicepValue ExpireOn + { + get { Initialize(); return _expireOn!; } + } + private BicepValue? _expireOn; + + /// + /// Friendly name of the certificate. + /// + public BicepValue FriendlyName + { + get { Initialize(); return _friendlyName!; } + } + private BicepValue? _friendlyName; + + /// + /// Specification for the App Service Environment to use for the + /// certificate. + /// + public HostingEnvironmentProfile HostingEnvironmentProfile + { + get { Initialize(); return _hostingEnvironmentProfile!; } + } + private HostingEnvironmentProfile? _hostingEnvironmentProfile; + + /// + /// Gets the Id. + /// + public BicepValue Id + { + get { Initialize(); return _id!; } + } + private BicepValue? _id; + + /// + /// Certificate issue Date. + /// + public BicepValue IssueOn + { + get { Initialize(); return _issueOn!; } + } + private BicepValue? _issueOn; + + /// + /// Certificate issuer. + /// + public BicepValue Issuer + { + get { Initialize(); return _issuer!; } + } + private BicepValue? _issuer; + + /// + /// Is the certificate valid?. + /// + public BicepValue IsValid + { + get { Initialize(); return _isValid!; } + } + private BicepValue? _isValid; + + /// + /// Status of the Key Vault secret. + /// + public BicepValue KeyVaultSecretStatus + { + get { Initialize(); return _keyVaultSecretStatus!; } + } + private BicepValue? _keyVaultSecretStatus; + + /// + /// Public key hash. + /// + public BicepValue PublicKeyHash + { + get { Initialize(); return _publicKeyHash!; } + } + private BicepValue? _publicKeyHash; + + /// + /// Self link. + /// + public BicepValue SelfLink + { + get { Initialize(); return _selfLink!; } + } + private BicepValue? _selfLink; + + /// + /// App name. + /// + public BicepValue SiteName + { + get { Initialize(); return _siteName!; } + } + private BicepValue? _siteName; + + /// + /// Subject name of the certificate. + /// + public BicepValue SubjectName + { + get { Initialize(); return _subjectName!; } + } + private BicepValue? _subjectName; + + /// + /// Gets the SystemData. + /// + public SystemData SystemData + { + get { Initialize(); return _systemData!; } + } + private SystemData? _systemData; + + /// + /// Certificate thumbprint. To assign an object to + /// this property use + /// System.BinaryData.FromObjectAsJson``1(``0,System.Text.Json.JsonSerializerOptions). + /// To assign an already formated json string to + /// this property use System.BinaryData.FromString(System.String). + /// 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 BicepValue Thumbprint + { + get { Initialize(); return _thumbprint!; } + } + private BicepValue? _thumbprint; + + /// + /// Certificate thumbprint. + /// + public BicepValue ThumbprintString + { + get { Initialize(); return _thumbprintString!; } + } + private BicepValue? _thumbprintString; + + /// + /// Gets or sets a reference to the parent WebSite. + /// + public WebSite? Parent + { + get { Initialize(); return _parent!.Value; } + set { Initialize(); _parent!.Value = value; } + } + private ResourceReference? _parent; + + /// + /// Creates a new SiteCertificate. + /// + /// + /// The the Bicep identifier name of the SiteCertificate resource. This + /// can be used to refer to the resource in expressions, but is not the + /// Azure name of the resource. This value can contain letters, numbers, + /// and underscores. + /// + /// Version of the SiteCertificate. + public SiteCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/certificates", resourceVersion ?? "2024-11-01") + { + } + + /// + /// Define all the provisionable properties of SiteCertificate. + /// + protected override void DefineProvisionableProperties() + { + _name = DefineProperty("Name", ["name"], isRequired: true); + _location = DefineProperty("Location", ["location"], isRequired: true); + _canonicalName = DefineProperty("CanonicalName", ["properties", "canonicalName"]); + _domainValidationMethod = DefineProperty("DomainValidationMethod", ["properties", "domainValidationMethod"]); + _hostNames = DefineListProperty("HostNames", ["properties", "hostNames"]); + _keyVaultId = DefineProperty("KeyVaultId", ["properties", "keyVaultId"]); + _keyVaultSecretName = DefineProperty("KeyVaultSecretName", ["properties", "keyVaultSecretName"]); + _kind = DefineProperty("Kind", ["kind"]); + _password = DefineProperty("Password", ["properties", "password"]); + _pfxBlob = DefineProperty("PfxBlob", ["properties", "pfxBlob"]); + _serverFarmId = DefineProperty("ServerFarmId", ["properties", "serverFarmId"]); + _tags = DefineDictionaryProperty("Tags", ["tags"]); + _cerBlob = DefineProperty("CerBlob", ["properties", "cerBlob"], isOutput: true); + _expireOn = DefineProperty("ExpireOn", ["properties", "expirationDate"], isOutput: true); + _friendlyName = DefineProperty("FriendlyName", ["properties", "friendlyName"], isOutput: true); + _hostingEnvironmentProfile = DefineModelProperty("HostingEnvironmentProfile", ["properties", "hostingEnvironmentProfile"], isOutput: true); + _id = DefineProperty("Id", ["id"], isOutput: true); + _issueOn = DefineProperty("IssueOn", ["properties", "issueDate"], isOutput: true); + _issuer = DefineProperty("Issuer", ["properties", "issuer"], isOutput: true); + _isValid = DefineProperty("IsValid", ["properties", "valid"], isOutput: true); + _keyVaultSecretStatus = DefineProperty("KeyVaultSecretStatus", ["properties", "keyVaultSecretStatus"], isOutput: true); + _publicKeyHash = DefineProperty("PublicKeyHash", ["properties", "publicKeyHash"], isOutput: true); + _selfLink = DefineProperty("SelfLink", ["properties", "selfLink"], isOutput: true); + _siteName = DefineProperty("SiteName", ["properties", "siteName"], isOutput: true); + _subjectName = DefineProperty("SubjectName", ["properties", "subjectName"], isOutput: true); + _systemData = DefineModelProperty("SystemData", ["systemData"], isOutput: true); + _thumbprint = DefineProperty("Thumbprint", ["Thumbprint"], isOutput: true); + _thumbprintString = DefineProperty("ThumbprintString", ["properties", "thumbprint"], isOutput: true); + _parent = DefineResource("Parent", ["parent"], isRequired: true); + } + + /// + /// Supported SiteCertificate resource versions. + /// + public static class ResourceVersions + { + /// + /// 2024-11-01. + /// + public static readonly string V2024_11_01 = "2024-11-01"; + } + + /// + /// Creates a reference to an existing SiteCertificate. + /// + /// + /// The the Bicep identifier name of the SiteCertificate resource. This + /// can be used to refer to the resource in expressions, but is not the + /// Azure name of the resource. This value can contain letters, numbers, + /// and underscores. + /// + /// Version of the SiteCertificate. + /// The existing SiteCertificate resource. + public static SiteCertificate 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 48ac6c139f62..fa5596cb88b3 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteContainer.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteContainer.cs @@ -58,6 +58,18 @@ public BicepValue Image } private BicepValue? _image; + /// + /// <code>true</code> if all AppSettings and ConnectionStrings + /// have to be passed to the container as environment variables; + /// <code>false</code> otherwise. + /// + public BicepValue InheritAppSettingsAndConnectionStrings + { + get { Initialize(); return _inheritAppSettingsAndConnectionStrings!; } + set { Initialize(); _inheritAppSettingsAndConnectionStrings!.Assign(value); } + } + private BicepValue? _inheritAppSettingsAndConnectionStrings; + /// /// <code>true</code> if the container is the main site /// container; <code>false</code> otherwise. @@ -209,6 +221,7 @@ protected override void DefineProvisionableProperties() _authType = DefineProperty("AuthType", ["properties", "authType"]); _environmentVariables = DefineListProperty("EnvironmentVariables", ["properties", "environmentVariables"]); _image = DefineProperty("Image", ["properties", "image"]); + _inheritAppSettingsAndConnectionStrings = DefineProperty("InheritAppSettingsAndConnectionStrings", ["properties", "inheritAppSettingsAndConnectionStrings"]); _isMain = DefineProperty("IsMain", ["properties", "isMain"]); _kind = DefineProperty("Kind", ["kind"]); _passwordSecret = DefineProperty("PasswordSecret", ["properties", "passwordSecret"]); diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotCertificate.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotCertificate.cs new file mode 100644 index 000000000000..9c8404dd496a --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotCertificate.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable enable + +using Azure.Core; +using Azure.Provisioning; +using Azure.Provisioning.Primitives; +using Azure.Provisioning.Resources; +using System; + +namespace Azure.Provisioning.AppService; + +/// +/// SiteSlotCertificate. +/// +public partial class SiteSlotCertificate : ProvisionableResource +{ + /// + /// Name of the certificate. + /// + public BicepValue Name + { + get { Initialize(); return _name!; } + set { Initialize(); _name!.Assign(value); } + } + private BicepValue? _name; + + /// + /// Gets or sets the Location. + /// + public BicepValue Location + { + get { Initialize(); return _location!; } + set { Initialize(); _location!.Assign(value); } + } + private BicepValue? _location; + + /// + /// CNAME of the certificate to be issued via free certificate. + /// + public BicepValue CanonicalName + { + get { Initialize(); return _canonicalName!; } + set { Initialize(); _canonicalName!.Assign(value); } + } + private BicepValue? _canonicalName; + + /// + /// Method of domain validation for free cert. + /// + public BicepValue DomainValidationMethod + { + get { Initialize(); return _domainValidationMethod!; } + set { Initialize(); _domainValidationMethod!.Assign(value); } + } + private BicepValue? _domainValidationMethod; + + /// + /// Host names the certificate applies to. + /// + public BicepList HostNames + { + get { Initialize(); return _hostNames!; } + set { Initialize(); _hostNames!.Assign(value); } + } + private BicepList? _hostNames; + + /// + /// Azure Key Vault Csm resource Id. + /// + public BicepValue KeyVaultId + { + get { Initialize(); return _keyVaultId!; } + set { Initialize(); _keyVaultId!.Assign(value); } + } + private BicepValue? _keyVaultId; + + /// + /// Azure Key Vault secret name. + /// + public BicepValue KeyVaultSecretName + { + get { Initialize(); return _keyVaultSecretName!; } + set { Initialize(); _keyVaultSecretName!.Assign(value); } + } + private BicepValue? _keyVaultSecretName; + + /// + /// Kind of resource. If the resource is an app, you can refer to + /// https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference + /// for details supported values for kind. + /// + public BicepValue Kind + { + get { Initialize(); return _kind!; } + set { Initialize(); _kind!.Assign(value); } + } + private BicepValue? _kind; + + /// + /// Certificate password. + /// + public BicepValue Password + { + get { Initialize(); return _password!; } + set { Initialize(); _password!.Assign(value); } + } + private BicepValue? _password; + + /// + /// Pfx blob. + /// + public BicepValue PfxBlob + { + get { Initialize(); return _pfxBlob!; } + set { Initialize(); _pfxBlob!.Assign(value); } + } + private BicepValue? _pfxBlob; + + /// + /// Resource ID of the associated App Service plan. + /// + public BicepValue ServerFarmId + { + get { Initialize(); return _serverFarmId!; } + set { Initialize(); _serverFarmId!.Assign(value); } + } + private BicepValue? _serverFarmId; + + /// + /// Gets or sets the Tags. + /// + public BicepDictionary Tags + { + get { Initialize(); return _tags!; } + set { Initialize(); _tags!.Assign(value); } + } + private BicepDictionary? _tags; + + /// + /// Raw bytes of .cer file. + /// + public BicepValue CerBlob + { + get { Initialize(); return _cerBlob!; } + } + private BicepValue? _cerBlob; + + /// + /// Certificate expiration date. + /// + public BicepValue ExpireOn + { + get { Initialize(); return _expireOn!; } + } + private BicepValue? _expireOn; + + /// + /// Friendly name of the certificate. + /// + public BicepValue FriendlyName + { + get { Initialize(); return _friendlyName!; } + } + private BicepValue? _friendlyName; + + /// + /// Specification for the App Service Environment to use for the + /// certificate. + /// + public HostingEnvironmentProfile HostingEnvironmentProfile + { + get { Initialize(); return _hostingEnvironmentProfile!; } + } + private HostingEnvironmentProfile? _hostingEnvironmentProfile; + + /// + /// Gets the Id. + /// + public BicepValue Id + { + get { Initialize(); return _id!; } + } + private BicepValue? _id; + + /// + /// Certificate issue Date. + /// + public BicepValue IssueOn + { + get { Initialize(); return _issueOn!; } + } + private BicepValue? _issueOn; + + /// + /// Certificate issuer. + /// + public BicepValue Issuer + { + get { Initialize(); return _issuer!; } + } + private BicepValue? _issuer; + + /// + /// Is the certificate valid?. + /// + public BicepValue IsValid + { + get { Initialize(); return _isValid!; } + } + private BicepValue? _isValid; + + /// + /// Status of the Key Vault secret. + /// + public BicepValue KeyVaultSecretStatus + { + get { Initialize(); return _keyVaultSecretStatus!; } + } + private BicepValue? _keyVaultSecretStatus; + + /// + /// Public key hash. + /// + public BicepValue PublicKeyHash + { + get { Initialize(); return _publicKeyHash!; } + } + private BicepValue? _publicKeyHash; + + /// + /// Self link. + /// + public BicepValue SelfLink + { + get { Initialize(); return _selfLink!; } + } + private BicepValue? _selfLink; + + /// + /// App name. + /// + public BicepValue SiteName + { + get { Initialize(); return _siteName!; } + } + private BicepValue? _siteName; + + /// + /// Subject name of the certificate. + /// + public BicepValue SubjectName + { + get { Initialize(); return _subjectName!; } + } + private BicepValue? _subjectName; + + /// + /// Gets the SystemData. + /// + public SystemData SystemData + { + get { Initialize(); return _systemData!; } + } + private SystemData? _systemData; + + /// + /// Certificate thumbprint. To assign an object to + /// this property use + /// System.BinaryData.FromObjectAsJson``1(``0,System.Text.Json.JsonSerializerOptions). + /// To assign an already formated json string to + /// this property use System.BinaryData.FromString(System.String). + /// 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 BicepValue Thumbprint + { + get { Initialize(); return _thumbprint!; } + } + private BicepValue? _thumbprint; + + /// + /// Certificate thumbprint. + /// + public BicepValue ThumbprintString + { + get { Initialize(); return _thumbprintString!; } + } + private BicepValue? _thumbprintString; + + /// + /// Gets or sets a reference to the parent WebSiteSlot. + /// + public WebSiteSlot? Parent + { + get { Initialize(); return _parent!.Value; } + set { Initialize(); _parent!.Value = value; } + } + private ResourceReference? _parent; + + /// + /// Creates a new SiteSlotCertificate. + /// + /// + /// The the Bicep identifier name of the SiteSlotCertificate resource. + /// This can be used to refer to the resource in expressions, but is not + /// the Azure name of the resource. This value can contain letters, + /// numbers, and underscores. + /// + /// Version of the SiteSlotCertificate. + public SiteSlotCertificate(string bicepIdentifier, string? resourceVersion = default) + : base(bicepIdentifier, "Microsoft.Web/sites/slots/certificates", resourceVersion ?? "2024-11-01") + { + } + + /// + /// Define all the provisionable properties of SiteSlotCertificate. + /// + protected override void DefineProvisionableProperties() + { + _name = DefineProperty("Name", ["name"], isRequired: true); + _location = DefineProperty("Location", ["location"], isRequired: true); + _canonicalName = DefineProperty("CanonicalName", ["properties", "canonicalName"]); + _domainValidationMethod = DefineProperty("DomainValidationMethod", ["properties", "domainValidationMethod"]); + _hostNames = DefineListProperty("HostNames", ["properties", "hostNames"]); + _keyVaultId = DefineProperty("KeyVaultId", ["properties", "keyVaultId"]); + _keyVaultSecretName = DefineProperty("KeyVaultSecretName", ["properties", "keyVaultSecretName"]); + _kind = DefineProperty("Kind", ["kind"]); + _password = DefineProperty("Password", ["properties", "password"]); + _pfxBlob = DefineProperty("PfxBlob", ["properties", "pfxBlob"]); + _serverFarmId = DefineProperty("ServerFarmId", ["properties", "serverFarmId"]); + _tags = DefineDictionaryProperty("Tags", ["tags"]); + _cerBlob = DefineProperty("CerBlob", ["properties", "cerBlob"], isOutput: true); + _expireOn = DefineProperty("ExpireOn", ["properties", "expirationDate"], isOutput: true); + _friendlyName = DefineProperty("FriendlyName", ["properties", "friendlyName"], isOutput: true); + _hostingEnvironmentProfile = DefineModelProperty("HostingEnvironmentProfile", ["properties", "hostingEnvironmentProfile"], isOutput: true); + _id = DefineProperty("Id", ["id"], isOutput: true); + _issueOn = DefineProperty("IssueOn", ["properties", "issueDate"], isOutput: true); + _issuer = DefineProperty("Issuer", ["properties", "issuer"], isOutput: true); + _isValid = DefineProperty("IsValid", ["properties", "valid"], isOutput: true); + _keyVaultSecretStatus = DefineProperty("KeyVaultSecretStatus", ["properties", "keyVaultSecretStatus"], isOutput: true); + _publicKeyHash = DefineProperty("PublicKeyHash", ["properties", "publicKeyHash"], isOutput: true); + _selfLink = DefineProperty("SelfLink", ["properties", "selfLink"], isOutput: true); + _siteName = DefineProperty("SiteName", ["properties", "siteName"], isOutput: true); + _subjectName = DefineProperty("SubjectName", ["properties", "subjectName"], isOutput: true); + _systemData = DefineModelProperty("SystemData", ["systemData"], isOutput: true); + _thumbprint = DefineProperty("Thumbprint", ["Thumbprint"], isOutput: true); + _thumbprintString = DefineProperty("ThumbprintString", ["properties", "thumbprint"], isOutput: true); + _parent = DefineResource("Parent", ["parent"], isRequired: true); + } + + /// + /// Supported SiteSlotCertificate resource versions. + /// + public static class ResourceVersions + { + /// + /// 2024-11-01. + /// + public static readonly string V2024_11_01 = "2024-11-01"; + } + + /// + /// Creates a reference to an existing SiteSlotCertificate. + /// + /// + /// The the Bicep identifier name of the SiteSlotCertificate resource. + /// This can be used to refer to the resource in expressions, but is not + /// the Azure name of the resource. This value can contain letters, + /// numbers, and underscores. + /// + /// Version of the SiteSlotCertificate. + /// The existing SiteSlotCertificate resource. + public static SiteSlotCertificate 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 d9295a11d9aa..93424f0c960d 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotSiteContainer.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/SiteSlotSiteContainer.cs @@ -58,6 +58,18 @@ public BicepValue Image } private BicepValue? _image; + /// + /// <code>true</code> if all AppSettings and ConnectionStrings + /// have to be passed to the container as environment variables; + /// <code>false</code> otherwise. + /// + public BicepValue InheritAppSettingsAndConnectionStrings + { + get { Initialize(); return _inheritAppSettingsAndConnectionStrings!; } + set { Initialize(); _inheritAppSettingsAndConnectionStrings!.Assign(value); } + } + private BicepValue? _inheritAppSettingsAndConnectionStrings; + /// /// <code>true</code> if the container is the main site /// container; <code>false</code> otherwise. @@ -209,6 +221,7 @@ protected override void DefineProvisionableProperties() _authType = DefineProperty("AuthType", ["properties", "authType"]); _environmentVariables = DefineListProperty("EnvironmentVariables", ["properties", "environmentVariables"]); _image = DefineProperty("Image", ["properties", "image"]); + _inheritAppSettingsAndConnectionStrings = DefineProperty("InheritAppSettingsAndConnectionStrings", ["properties", "inheritAppSettingsAndConnectionStrings"]); _isMain = DefineProperty("IsMain", ["properties", "isMain"]); _kind = DefineProperty("Kind", ["kind"]); _passwordSecret = DefineProperty("PasswordSecret", ["properties", "passwordSecret"]); diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSite.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSite.cs index 0f5fe0e808b9..a0f5689708e2 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSite.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSite.cs @@ -222,6 +222,32 @@ public BicepValue IsClientAffinityEnabled } private BicepValue? _isClientAffinityEnabled; + /// + /// <code>true</code> to enable client affinity partitioning + /// using CHIPS cookies, this will add the + /// <code>partitioned</code> property to the affinity cookies; + /// <code>false</code> to stop sending partitioned affinity + /// cookies. Default is <code>false</code>. + /// + public BicepValue IsClientAffinityPartitioningEnabled + { + get { Initialize(); return _isClientAffinityPartitioningEnabled!; } + set { Initialize(); _isClientAffinityPartitioningEnabled!.Assign(value); } + } + private BicepValue? _isClientAffinityPartitioningEnabled; + + /// + /// <code>true</code> to override client affinity cookie domain + /// with X-Forwarded-Host request header. <code>false</code> + /// to use default domain. Default is <code>false</code>. + /// + public BicepValue IsClientAffinityProxyEnabled + { + get { Initialize(); return _isClientAffinityProxyEnabled!; } + set { Initialize(); _isClientAffinityProxyEnabled!.Assign(value); } + } + private BicepValue? _isClientAffinityProxyEnabled; + /// /// <code>true</code> to enable client certificate /// authentication (TLS mutual authentication); otherwise, @@ -315,6 +341,16 @@ public BicepValue IsScmSiteAlsoStopped } private BicepValue? _isScmSiteAlsoStopped; + /// + /// Whether to enable ssh access. + /// + public BicepValue IsSshEnabled + { + get { Initialize(); return _isSshEnabled!; } + set { Initialize(); _isSshEnabled!.Assign(value); } + } + private BicepValue? _isSshEnabled; + /// /// Checks if Customer provided storage account is required. /// @@ -410,6 +446,17 @@ public BicepValue ManagedEnvironmentId } private BicepValue? _managedEnvironmentId; + /// + /// Property to configure various outbound traffic routing options over + /// virtual network for a site. + /// + public OutboundVnetRouting OutboundVnetRouting + { + get { Initialize(); return _outboundVnetRouting!; } + set { Initialize(); AssignOrReplace(ref _outboundVnetRouting, value); } + } + private OutboundVnetRouting? _outboundVnetRouting; + /// /// Property to allow or block all public traffic. Allowed Values: /// 'Enabled', 'Disabled' or an empty string. @@ -442,7 +489,9 @@ public FunctionAppResourceConfig ResourceConfig private FunctionAppResourceConfig? _resourceConfig; /// - /// Configuration of the app. + /// Configuration of an App Service app. This property is not returned in + /// response to normal create and read requests since it may contain + /// sensitive information. /// public SiteConfigProperties SiteConfig { @@ -723,6 +772,8 @@ protected override void DefineProvisionableProperties() _identity = DefineModelProperty("Identity", ["identity"]); _iPMode = DefineProperty("IPMode", ["properties", "ipMode"]); _isClientAffinityEnabled = DefineProperty("IsClientAffinityEnabled", ["properties", "clientAffinityEnabled"]); + _isClientAffinityPartitioningEnabled = DefineProperty("IsClientAffinityPartitioningEnabled", ["properties", "clientAffinityPartitioningEnabled"]); + _isClientAffinityProxyEnabled = DefineProperty("IsClientAffinityProxyEnabled", ["properties", "clientAffinityProxyEnabled"]); _isClientCertEnabled = DefineProperty("IsClientCertEnabled", ["properties", "clientCertEnabled"]); _isEnabled = DefineProperty("IsEnabled", ["properties", "enabled"]); _isEndToEndEncryptionEnabled = DefineProperty("IsEndToEndEncryptionEnabled", ["properties", "endToEndEncryptionEnabled"]); @@ -731,6 +782,7 @@ protected override void DefineProvisionableProperties() _isHyperV = DefineProperty("IsHyperV", ["properties", "hyperV"]); _isReserved = DefineProperty("IsReserved", ["properties", "reserved"]); _isScmSiteAlsoStopped = DefineProperty("IsScmSiteAlsoStopped", ["properties", "scmSiteAlsoStopped"]); + _isSshEnabled = DefineProperty("IsSshEnabled", ["properties", "sshEnabled"]); _isStorageAccountRequired = DefineProperty("IsStorageAccountRequired", ["properties", "storageAccountRequired"]); _isVnetBackupRestoreEnabled = DefineProperty("IsVnetBackupRestoreEnabled", ["properties", "vnetBackupRestoreEnabled"]); _isVnetContentShareEnabled = DefineProperty("IsVnetContentShareEnabled", ["properties", "vnetContentShareEnabled"]); @@ -740,6 +792,7 @@ protected override void DefineProvisionableProperties() _keyVaultReferenceIdentity = DefineProperty("KeyVaultReferenceIdentity", ["properties", "keyVaultReferenceIdentity"]); _kind = DefineProperty("Kind", ["kind"]); _managedEnvironmentId = DefineProperty("ManagedEnvironmentId", ["properties", "managedEnvironmentId"]); + _outboundVnetRouting = DefineModelProperty("OutboundVnetRouting", ["properties", "outboundVnetRouting"]); _publicNetworkAccess = DefineProperty("PublicNetworkAccess", ["properties", "publicNetworkAccess"]); _redundancyMode = DefineProperty("RedundancyMode", ["properties", "redundancyMode"]); _resourceConfig = DefineModelProperty("ResourceConfig", ["properties", "resourceConfig"]); diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteConfig.cs index 6b1c5b139843..d394bf4f205f 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteConfig.cs @@ -78,7 +78,9 @@ public BicepValue AppCommandLine private BicepValue? _appCommandLine; /// - /// Application settings. + /// Application settings. This property is not returned in response to + /// normal create and read requests since it may contain sensitive + /// information. /// public BicepList AppSettings { @@ -118,7 +120,8 @@ public BicepDictionary AzureStorageAccounts private BicepDictionary? _azureStorageAccounts; /// - /// Connection strings. + /// Connection strings. This property is not returned in response to normal + /// create and read requests since it may contain sensitive information. /// public BicepList ConnectionStrings { @@ -221,6 +224,18 @@ public BicepValue HealthCheckPath } private BicepValue? _healthCheckPath; + /// + /// Http20ProxyFlag: Configures a website to allow http2.0 to pass be + /// proxied all the way to the app. 0 = disabled, 1 = pass through all + /// http2 traffic, 2 = pass through gRPC only. + /// + public BicepValue Http20ProxyFlag + { + get { Initialize(); return _http20ProxyFlag!; } + set { Initialize(); _http20ProxyFlag!.Assign(value); } + } + private BicepValue? _http20ProxyFlag; + /// /// IP security restrictions for main. /// @@ -855,6 +870,7 @@ protected override void DefineProvisionableProperties() _functionAppScaleLimit = DefineProperty("FunctionAppScaleLimit", ["properties", "functionAppScaleLimit"]); _handlerMappings = DefineListProperty("HandlerMappings", ["properties", "handlerMappings"]); _healthCheckPath = DefineProperty("HealthCheckPath", ["properties", "healthCheckPath"]); + _http20ProxyFlag = DefineProperty("Http20ProxyFlag", ["properties", "http20ProxyFlag"]); _iPSecurityRestrictions = DefineListProperty("IPSecurityRestrictions", ["properties", "ipSecurityRestrictions"]); _iPSecurityRestrictionsDefaultAction = DefineProperty("IPSecurityRestrictionsDefaultAction", ["properties", "ipSecurityRestrictionsDefaultAction"]); _isAlwaysOn = DefineProperty("IsAlwaysOn", ["properties", "alwaysOn"]); diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlot.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlot.cs index 6defd9cbe1bc..ec3d9ef38ec4 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlot.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlot.cs @@ -220,6 +220,32 @@ public BicepValue IsClientAffinityEnabled } private BicepValue? _isClientAffinityEnabled; + /// + /// <code>true</code> to enable client affinity partitioning + /// using CHIPS cookies, this will add the + /// <code>partitioned</code> property to the affinity cookies; + /// <code>false</code> to stop sending partitioned affinity + /// cookies. Default is <code>false</code>. + /// + public BicepValue IsClientAffinityPartitioningEnabled + { + get { Initialize(); return _isClientAffinityPartitioningEnabled!; } + set { Initialize(); _isClientAffinityPartitioningEnabled!.Assign(value); } + } + private BicepValue? _isClientAffinityPartitioningEnabled; + + /// + /// <code>true</code> to override client affinity cookie domain + /// with X-Forwarded-Host request header. <code>false</code> + /// to use default domain. Default is <code>false</code>. + /// + public BicepValue IsClientAffinityProxyEnabled + { + get { Initialize(); return _isClientAffinityProxyEnabled!; } + set { Initialize(); _isClientAffinityProxyEnabled!.Assign(value); } + } + private BicepValue? _isClientAffinityProxyEnabled; + /// /// <code>true</code> to enable client certificate /// authentication (TLS mutual authentication); otherwise, @@ -313,6 +339,16 @@ public BicepValue IsScmSiteAlsoStopped } private BicepValue? _isScmSiteAlsoStopped; + /// + /// Whether to enable ssh access. + /// + public BicepValue IsSshEnabled + { + get { Initialize(); return _isSshEnabled!; } + set { Initialize(); _isSshEnabled!.Assign(value); } + } + private BicepValue? _isSshEnabled; + /// /// Checks if Customer provided storage account is required. /// @@ -408,6 +444,17 @@ public BicepValue ManagedEnvironmentId } private BicepValue? _managedEnvironmentId; + /// + /// Property to configure various outbound traffic routing options over + /// virtual network for a site. + /// + public OutboundVnetRouting OutboundVnetRouting + { + get { Initialize(); return _outboundVnetRouting!; } + set { Initialize(); AssignOrReplace(ref _outboundVnetRouting, value); } + } + private OutboundVnetRouting? _outboundVnetRouting; + /// /// Property to allow or block all public traffic. Allowed Values: /// 'Enabled', 'Disabled' or an empty string. @@ -440,7 +487,9 @@ public FunctionAppResourceConfig ResourceConfig private FunctionAppResourceConfig? _resourceConfig; /// - /// Configuration of the app. + /// Configuration of an App Service app. This property is not returned in + /// response to normal create and read requests since it may contain + /// sensitive information. /// public SiteConfigProperties SiteConfig { @@ -731,6 +780,8 @@ protected override void DefineProvisionableProperties() _identity = DefineModelProperty("Identity", ["identity"]); _iPMode = DefineProperty("IPMode", ["properties", "ipMode"]); _isClientAffinityEnabled = DefineProperty("IsClientAffinityEnabled", ["properties", "clientAffinityEnabled"]); + _isClientAffinityPartitioningEnabled = DefineProperty("IsClientAffinityPartitioningEnabled", ["properties", "clientAffinityPartitioningEnabled"]); + _isClientAffinityProxyEnabled = DefineProperty("IsClientAffinityProxyEnabled", ["properties", "clientAffinityProxyEnabled"]); _isClientCertEnabled = DefineProperty("IsClientCertEnabled", ["properties", "clientCertEnabled"]); _isEnabled = DefineProperty("IsEnabled", ["properties", "enabled"]); _isEndToEndEncryptionEnabled = DefineProperty("IsEndToEndEncryptionEnabled", ["properties", "endToEndEncryptionEnabled"]); @@ -739,6 +790,7 @@ protected override void DefineProvisionableProperties() _isHyperV = DefineProperty("IsHyperV", ["properties", "hyperV"]); _isReserved = DefineProperty("IsReserved", ["properties", "reserved"]); _isScmSiteAlsoStopped = DefineProperty("IsScmSiteAlsoStopped", ["properties", "scmSiteAlsoStopped"]); + _isSshEnabled = DefineProperty("IsSshEnabled", ["properties", "sshEnabled"]); _isStorageAccountRequired = DefineProperty("IsStorageAccountRequired", ["properties", "storageAccountRequired"]); _isVnetBackupRestoreEnabled = DefineProperty("IsVnetBackupRestoreEnabled", ["properties", "vnetBackupRestoreEnabled"]); _isVnetContentShareEnabled = DefineProperty("IsVnetContentShareEnabled", ["properties", "vnetContentShareEnabled"]); @@ -748,6 +800,7 @@ protected override void DefineProvisionableProperties() _keyVaultReferenceIdentity = DefineProperty("KeyVaultReferenceIdentity", ["properties", "keyVaultReferenceIdentity"]); _kind = DefineProperty("Kind", ["kind"]); _managedEnvironmentId = DefineProperty("ManagedEnvironmentId", ["properties", "managedEnvironmentId"]); + _outboundVnetRouting = DefineModelProperty("OutboundVnetRouting", ["properties", "outboundVnetRouting"]); _publicNetworkAccess = DefineProperty("PublicNetworkAccess", ["properties", "publicNetworkAccess"]); _redundancyMode = DefineProperty("RedundancyMode", ["properties", "redundancyMode"]); _resourceConfig = DefineModelProperty("ResourceConfig", ["properties", "resourceConfig"]); diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotConfig.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotConfig.cs index e541bb5c485f..5b0301f9c2fb 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotConfig.cs +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Generated/WebSiteSlotConfig.cs @@ -78,7 +78,9 @@ public BicepValue AppCommandLine private BicepValue? _appCommandLine; /// - /// Application settings. + /// Application settings. This property is not returned in response to + /// normal create and read requests since it may contain sensitive + /// information. /// public BicepList AppSettings { @@ -118,7 +120,8 @@ public BicepDictionary AzureStorageAccounts private BicepDictionary? _azureStorageAccounts; /// - /// Connection strings. + /// Connection strings. This property is not returned in response to normal + /// create and read requests since it may contain sensitive information. /// public BicepList ConnectionStrings { @@ -221,6 +224,18 @@ public BicepValue HealthCheckPath } private BicepValue? _healthCheckPath; + /// + /// Http20ProxyFlag: Configures a website to allow http2.0 to pass be + /// proxied all the way to the app. 0 = disabled, 1 = pass through all + /// http2 traffic, 2 = pass through gRPC only. + /// + public BicepValue Http20ProxyFlag + { + get { Initialize(); return _http20ProxyFlag!; } + set { Initialize(); _http20ProxyFlag!.Assign(value); } + } + private BicepValue? _http20ProxyFlag; + /// /// IP security restrictions for main. /// @@ -855,6 +870,7 @@ protected override void DefineProvisionableProperties() _functionAppScaleLimit = DefineProperty("FunctionAppScaleLimit", ["properties", "functionAppScaleLimit"]); _handlerMappings = DefineListProperty("HandlerMappings", ["properties", "handlerMappings"]); _healthCheckPath = DefineProperty("HealthCheckPath", ["properties", "healthCheckPath"]); + _http20ProxyFlag = DefineProperty("Http20ProxyFlag", ["properties", "http20ProxyFlag"]); _iPSecurityRestrictions = DefineListProperty("IPSecurityRestrictions", ["properties", "ipSecurityRestrictions"]); _iPSecurityRestrictionsDefaultAction = DefineProperty("IPSecurityRestrictionsDefaultAction", ["properties", "ipSecurityRestrictionsDefaultAction"]); _isAlwaysOn = DefineProperty("IsAlwaysOn", ["properties", "alwaysOn"]); diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/SiteAuthSettingsV2.cs b/sdk/provisioning/Azure.Provisioning.AppService/src/SiteAuthSettingsV2.cs new file mode 100644 index 000000000000..f088d446720c --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/SiteAuthSettingsV2.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using Azure.Provisioning.Expressions; +using Azure.Provisioning.Primitives; + +namespace Azure.Provisioning.AppService; + +public partial class SiteAuthSettingsV2 : ProvisionableResource +{ + /// + /// Get the default value for the Name property. + /// + private partial BicepValue GetNameDefaultValue() => + new StringLiteralExpression("authsettingsV2"); +} diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/Changelog.md b/sdk/provisioning/Azure.Provisioning.ContainerService/Changelog.md index fab141131055..4a30922f3d20 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/Changelog.md +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/Changelog.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.5 (Unreleased) ### Features Added @@ -10,6 +10,16 @@ ### Other Changes +## 1.0.0-beta.4 (2025-06-25) + +### Features Added + +- Included new api-versions + +### Bugs Fixed + +- Fixed bicep path for some properties. + ## 1.0.0-beta.3 (2025-06-16) ### Features Added diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/api/Azure.Provisioning.ContainerService.net8.0.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/api/Azure.Provisioning.ContainerService.net8.0.cs index 58d0ba8aa6a6..c31e5ad1a05e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/api/Azure.Provisioning.ContainerService.net8.0.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/api/Azure.Provisioning.ContainerService.net8.0.cs @@ -82,6 +82,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public enum AgentPoolType @@ -218,6 +219,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -350,6 +352,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public partial class ContainerServiceMaintenanceRelativeMonthlySchedule : Azure.Provisioning.Primitives.ProvisionableConstruct @@ -508,6 +511,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public enum ContainerServiceNetworkMode @@ -659,6 +663,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public enum ContainerServicePrivateEndpointConnectionProvisioningState @@ -793,6 +798,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public enum ContainerServiceTrustedAccessRoleBindingProvisioningState 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 58d0ba8aa6a6..c31e5ad1a05e 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 @@ -82,6 +82,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public enum AgentPoolType @@ -218,6 +219,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -350,6 +352,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public partial class ContainerServiceMaintenanceRelativeMonthlySchedule : Azure.Provisioning.Primitives.ProvisionableConstruct @@ -508,6 +511,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public enum ContainerServiceNetworkMode @@ -659,6 +663,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public enum ContainerServicePrivateEndpointConnectionProvisioningState @@ -793,6 +798,7 @@ public static partial class ResourceVersions public static readonly string V2025_01_01; public static readonly string V2025_02_01; public static readonly string V2025_03_01; + public static readonly string V2025_04_01; } } public enum ContainerServiceTrustedAccessRoleBindingProvisioningState diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Azure.Provisioning.ContainerService.csproj b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Azure.Provisioning.ContainerService.csproj index 02fd042ad8c6..52b058d8914e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Azure.Provisioning.ContainerService.csproj +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Azure.Provisioning.ContainerService.csproj @@ -2,7 +2,7 @@ Azure.Provisioning.ContainerService simplifies declarative resource provisioning in .NET. - 1.0.0-beta.4 + 1.0.0-beta.5 $(RequiredTargetFrameworks) 12 diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/AgentPoolSnapshot.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/AgentPoolSnapshot.cs index 4cc32b77bb4b..c4f2bf32f7e4 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/AgentPoolSnapshot.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/AgentPoolSnapshot.cs @@ -154,7 +154,7 @@ public BicepValue VmSize /// /// Version of the AgentPoolSnapshot. public AgentPoolSnapshot(string bicepIdentifier, string? resourceVersion = default) - : base(bicepIdentifier, "Microsoft.ContainerService/snapshots", resourceVersion ?? "2025-03-01") + : base(bicepIdentifier, "Microsoft.ContainerService/snapshots", resourceVersion ?? "2025-04-01") { } @@ -183,6 +183,11 @@ protected override void DefineProvisionableProperties() /// public static class ResourceVersions { + /// + /// 2025-04-01. + /// + public static readonly string V2025_04_01 = "2025-04-01"; + /// /// 2025-03-01. /// diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceAgentPool.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceAgentPool.cs index 51e91d0e1c60..7f056714ed13 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceAgentPool.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceAgentPool.cs @@ -558,7 +558,7 @@ public ContainerServiceManagedCluster? Parent /// /// Version of the ContainerServiceAgentPool. public ContainerServiceAgentPool(string bicepIdentifier, string? resourceVersion = default) - : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/agentPools", resourceVersion ?? "2025-03-01") + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/agentPools", resourceVersion ?? "2025-04-01") { } @@ -621,6 +621,11 @@ protected override void DefineProvisionableProperties() /// public static class ResourceVersions { + /// + /// 2025-04-01. + /// + public static readonly string V2025_04_01 = "2025-04-01"; + /// /// 2025-03-01. /// diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceMaintenanceConfiguration.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceMaintenanceConfiguration.cs index d654fb4336fc..4c39489adf6a 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceMaintenanceConfiguration.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceMaintenanceConfiguration.cs @@ -99,7 +99,7 @@ public ContainerServiceManagedCluster? Parent /// /// Version of the ContainerServiceMaintenanceConfiguration. public ContainerServiceMaintenanceConfiguration(string bicepIdentifier, string? resourceVersion = default) - : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", resourceVersion ?? "2025-03-01") + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/maintenanceConfigurations", resourceVersion ?? "2025-04-01") { } @@ -123,6 +123,11 @@ protected override void DefineProvisionableProperties() /// public static class ResourceVersions { + /// + /// 2025-04-01. + /// + public static readonly string V2025_04_01 = "2025-04-01"; + /// /// 2025-03-01. /// diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceManagedCluster.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceManagedCluster.cs index f66a52fcdec4..e98aae57640a 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceManagedCluster.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceManagedCluster.cs @@ -527,7 +527,7 @@ public SystemData SystemData /// /// Version of the ContainerServiceManagedCluster. public ContainerServiceManagedCluster(string bicepIdentifier, string? resourceVersion = default) - : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters", resourceVersion ?? "2025-03-01") + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters", resourceVersion ?? "2025-04-01") { } @@ -591,6 +591,11 @@ protected override void DefineProvisionableProperties() /// public static class ResourceVersions { + /// + /// 2025-04-01. + /// + public static readonly string V2025_04_01 = "2025-04-01"; + /// /// 2025-03-01. /// diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServicePrivateEndpointConnection.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServicePrivateEndpointConnection.cs index a8559a1a5e4d..94b8e9287556 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServicePrivateEndpointConnection.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServicePrivateEndpointConnection.cs @@ -97,7 +97,7 @@ public ContainerServiceManagedCluster? Parent /// /// Version of the ContainerServicePrivateEndpointConnection. public ContainerServicePrivateEndpointConnection(string bicepIdentifier, string? resourceVersion = default) - : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/privateEndpointConnections", resourceVersion ?? "2025-03-01") + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/privateEndpointConnections", resourceVersion ?? "2025-04-01") { } @@ -121,6 +121,11 @@ protected override void DefineProvisionableProperties() /// public static class ResourceVersions { + /// + /// 2025-04-01. + /// + public static readonly string V2025_04_01 = "2025-04-01"; + /// /// 2025-03-01. /// diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBinding.cs b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBinding.cs index b6286c5303c4..415cc0e57437 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBinding.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBinding.cs @@ -100,7 +100,7 @@ public ContainerServiceManagedCluster? Parent /// /// Version of the ContainerServiceTrustedAccessRoleBinding. public ContainerServiceTrustedAccessRoleBinding(string bicepIdentifier, string? resourceVersion = default) - : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", resourceVersion ?? "2025-03-01") + : base(bicepIdentifier, "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", resourceVersion ?? "2025-04-01") { } @@ -124,6 +124,11 @@ protected override void DefineProvisionableProperties() /// public static class ResourceVersions { + /// + /// 2025-04-01. + /// + public static readonly string V2025_04_01 = "2025-04-01"; + /// /// 2025-03-01. /// 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 aedbe8057362..fecb087ed9b4 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.cs +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Generated/Models/ManagedClusterStorageProfile.cs @@ -68,9 +68,9 @@ public ManagedClusterStorageProfile() protected override void DefineProvisionableProperties() { base.DefineProvisionableProperties(); - _isDiskCsiDriverEnabled = DefineProperty("IsDiskCsiDriverEnabled", ["diskCSIDriver"]); - _isFileCsiDriverEnabled = DefineProperty("IsFileCsiDriverEnabled", ["fileCSIDriver"]); - _isSnapshotControllerEnabled = DefineProperty("IsSnapshotControllerEnabled", ["snapshotController"]); - _isBlobCsiDriverEnabled = DefineProperty("IsBlobCsiDriverEnabled", ["blobCSIDriver"]); + _isDiskCsiDriverEnabled = DefineProperty("IsDiskCsiDriverEnabled", ["diskCSIDriver", "enabled"]); + _isFileCsiDriverEnabled = DefineProperty("IsFileCsiDriverEnabled", ["fileCSIDriver", "enabled"]); + _isSnapshotControllerEnabled = DefineProperty("IsSnapshotControllerEnabled", ["snapshotController", "enabled"]); + _isBlobCsiDriverEnabled = DefineProperty("IsBlobCsiDriverEnabled", ["blobCSIDriver", "enabled"]); } } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/CHANGELOG.md b/sdk/provisioning/Azure.Provisioning.PostgreSql/CHANGELOG.md index b11011837e34..e268f93cacca 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/CHANGELOG.md +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/CHANGELOG.md @@ -10,6 +10,12 @@ ### Other Changes +## 1.1.1 (2025-06-25) + +### Bugs Fixed + +- Hide some properties that are incorrectly generated in previous versions. + ## 1.1.0 (2025-06-16) ### Features Added diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/api/Azure.Provisioning.PostgreSql.net8.0.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/api/Azure.Provisioning.PostgreSql.net8.0.cs index 7e8b32f9a741..26da96b026d5 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/api/Azure.Provisioning.PostgreSql.net8.0.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/api/Azure.Provisioning.PostgreSql.net8.0.cs @@ -27,9 +27,13 @@ public DbMigrationStatus() { } public Azure.Provisioning.BicepValue Message { get { throw null; } } public Azure.Provisioning.BicepValue MigrationOperation { get { throw null; } } public Azure.Provisioning.BicepValue MigrationState { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue NumFullLoadCompletedTables { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue NumFullLoadErroredTables { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue NumFullLoadLoadingTables { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue NumFullLoadQueuedTables { get { throw null; } } public Azure.Provisioning.BicepValue StartedOn { get { throw null; } } protected override void DefineProvisionableProperties() { } 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 7e8b32f9a741..26da96b026d5 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 @@ -27,9 +27,13 @@ public DbMigrationStatus() { } public Azure.Provisioning.BicepValue Message { get { throw null; } } public Azure.Provisioning.BicepValue MigrationOperation { get { throw null; } } public Azure.Provisioning.BicepValue MigrationState { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue NumFullLoadCompletedTables { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue NumFullLoadErroredTables { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue NumFullLoadLoadingTables { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue NumFullLoadQueuedTables { get { throw null; } } public Azure.Provisioning.BicepValue StartedOn { get { throw null; } } protected override void DefineProvisionableProperties() { } diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj index 7e1e6a41e757..b4a741b3bfc0 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj @@ -4,7 +4,7 @@ Azure.Provisioning.PostgreSql simplifies declarative resource provisioning in .NET. 1.2.0-beta.1 - 1.1.0 + 1.1.1 $(RequiredTargetFrameworks) 12 diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/DbMigrationStatus.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/DbMigrationStatus.cs index f8259cbcc49c..a5b395b343ca 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/DbMigrationStatus.cs +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Generated/Models/DbMigrationStatus.cs @@ -15,42 +15,6 @@ namespace Azure.Provisioning.PostgreSql; /// public partial class DbMigrationStatus : ProvisionableConstruct { - /// - /// Number of tables queued for the migration of a DB. - /// - public BicepValue NumFullLoadQueuedTables - { - get { Initialize(); return _numFullLoadQueuedTables!; } - } - private BicepValue? _numFullLoadQueuedTables; - - /// - /// Number of tables errored out during the migration of a DB. - /// - public BicepValue NumFullLoadErroredTables - { - get { Initialize(); return _numFullLoadErroredTables!; } - } - private BicepValue? _numFullLoadErroredTables; - - /// - /// Number of tables loading during the migration of a DB. - /// - public BicepValue NumFullLoadLoadingTables - { - get { Initialize(); return _numFullLoadLoadingTables!; } - } - private BicepValue? _numFullLoadLoadingTables; - - /// - /// Number of tables loaded during the migration of a DB. - /// - public BicepValue NumFullLoadCompletedTables - { - get { Initialize(); return _numFullLoadCompletedTables!; } - } - private BicepValue? _numFullLoadCompletedTables; - /// /// Name of the database. /// @@ -208,10 +172,6 @@ public DbMigrationStatus() protected override void DefineProvisionableProperties() { base.DefineProvisionableProperties(); - _numFullLoadQueuedTables = DefineProperty("NumFullLoadQueuedTables", ["fullLoadQueuedTables"], isOutput: true); - _numFullLoadErroredTables = DefineProperty("NumFullLoadErroredTables", ["fullLoadErroredTables"], isOutput: true); - _numFullLoadLoadingTables = DefineProperty("NumFullLoadLoadingTables", ["fullLoadLoadingTables"], isOutput: true); - _numFullLoadCompletedTables = DefineProperty("NumFullLoadCompletedTables", ["fullLoadCompletedTables"], isOutput: true); _databaseName = DefineProperty("DatabaseName", ["databaseName"], isOutput: true); _migrationState = DefineProperty("MigrationState", ["migrationState"], isOutput: true); _migrationOperation = DefineProperty("MigrationOperation", ["migrationOperation"], isOutput: true); diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Models/DbMigrationStatus.cs b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Models/DbMigrationStatus.cs new file mode 100644 index 000000000000..d6133b5fa6af --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Models/DbMigrationStatus.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System.ComponentModel; +using Azure.Provisioning.Primitives; + +namespace Azure.Provisioning.PostgreSql; + +public partial class DbMigrationStatus : ProvisionableConstruct +{ + /// + /// Number of tables queued for the migration of a DB. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue NumFullLoadQueuedTables => FullLoadQueuedTables; + + /// + /// Number of tables errored out during the migration of a DB. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue NumFullLoadErroredTables => FullLoadErroredTables; + + /// + /// Number of tables loading during the migration of a DB. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue NumFullLoadLoadingTables => FullLoadLoadingTables; + + /// + /// Number of tables loaded during the migration of a DB. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue NumFullLoadCompletedTables => FullLoadCompletedTables; +} diff --git a/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md b/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md index 9512967b4806..7c8470850256 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md +++ b/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md @@ -10,6 +10,12 @@ ### Other Changes +## 1.1.1 (2025-06-25) + +### Bugs Fixed + +- Hide some properties that are incorrectly generated in previous versions. + ## 1.1.0 (2025-06-16) ### Features Added diff --git a/sdk/provisioning/Azure.Provisioning.Storage/api/Azure.Provisioning.Storage.net8.0.cs b/sdk/provisioning/Azure.Provisioning.Storage/api/Azure.Provisioning.Storage.net8.0.cs index 53d2d42886e5..118fac85b6f5 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/api/Azure.Provisioning.Storage.net8.0.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/api/Azure.Provisioning.Storage.net8.0.cs @@ -1720,6 +1720,7 @@ public StorageTaskAssignmentProperties() { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.Storage.StorageTaskAssignmentExecutionContext ExecutionContext { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue ReportPrefix { get { throw null; } set { } } public Azure.Provisioning.Storage.StorageTaskReportProperties RunStatus { get { throw null; } set { } } 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 53d2d42886e5..118fac85b6f5 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 @@ -1720,6 +1720,7 @@ public StorageTaskAssignmentProperties() { } public Azure.Provisioning.BicepValue Description { get { throw null; } set { } } public Azure.Provisioning.Storage.StorageTaskAssignmentExecutionContext ExecutionContext { get { throw null; } set { } } public Azure.Provisioning.BicepValue IsEnabled { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Provisioning.BicepValue ProvisioningState { get { throw null; } } public Azure.Provisioning.BicepValue ReportPrefix { get { throw null; } set { } } public Azure.Provisioning.Storage.StorageTaskReportProperties RunStatus { get { throw null; } set { } } diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj b/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj index 81f34de38646..f3b180f17cd9 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj @@ -4,7 +4,7 @@ Azure.Provisioning.Storage simplifies declarative resource provisioning in .NET for Azure Storage. 1.2.0-beta.1 - 1.1.0 + 1.1.1 $(RequiredTargetFrameworks) 12 diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTaskAssignmentProperties.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTaskAssignmentProperties.cs index 319c369887cd..b50be4a9d581 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTaskAssignmentProperties.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/Models/StorageTaskAssignmentProperties.cs @@ -17,15 +17,6 @@ namespace Azure.Provisioning.Storage; /// public partial class StorageTaskAssignmentProperties : ProvisionableConstruct { - /// - /// Represents the provisioning state of the storage task assignment. - /// - public BicepValue ProvisioningState - { - get { Initialize(); return _provisioningState!; } - } - private BicepValue? _provisioningState; - /// /// Id of the corresponding storage task. /// diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Models/StorageTaskAssignmentProperties.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Models/StorageTaskAssignmentProperties.cs new file mode 100644 index 000000000000..76c169bdb073 --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Models/StorageTaskAssignmentProperties.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ComponentModel; + +namespace Azure.Provisioning.Storage; + +public partial class StorageTaskAssignmentProperties +{ + /// + /// Represents the provisioning state of the storage task assignment. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BicepValue ProvisioningState + { + get { Initialize(); return _provisioningState!; } + } + private BicepValue? _provisioningState; +} diff --git a/sdk/provisioning/Generator/src/Model/Property.cs b/sdk/provisioning/Generator/src/Model/Property.cs index dfd7d66df964..9a7e15216053 100644 --- a/sdk/provisioning/Generator/src/Model/Property.cs +++ b/sdk/provisioning/Generator/src/Model/Property.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Generator.Model; using System.Collections.Generic; using System.Reflection; @@ -78,6 +79,8 @@ static string GetBicepType(ModelBase? type) => } } + public PropertyHideLevel HideLevel { get; set; } = PropertyHideLevel.DoNotHide; + public override string ToString() => $""; } diff --git a/sdk/provisioning/Generator/src/Model/PropertyHideLevel.cs b/sdk/provisioning/Generator/src/Model/PropertyHideLevel.cs new file mode 100644 index 000000000000..35be63cc6a68 --- /dev/null +++ b/sdk/provisioning/Generator/src/Model/PropertyHideLevel.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Generator.Model +{ + [Flags] + public enum PropertyHideLevel + { + DoNotHide = 0, + HideProperty = 1, + HideField = 2 + } +} diff --git a/sdk/provisioning/Generator/src/Model/SimpleModel.cs b/sdk/provisioning/Generator/src/Model/SimpleModel.cs index 730390ba05b1..ee722036496b 100644 --- a/sdk/provisioning/Generator/src/Model/SimpleModel.cs +++ b/sdk/provisioning/Generator/src/Model/SimpleModel.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Generator.Model; using System; using System.Collections.Generic; using System.IO; @@ -52,6 +53,11 @@ public override void Generate() // Write the properties foreach (Property property in Properties) { + // we do not write those hidden properties with EditorBrowsableAttribute, these should be added back by customized code in partial classes + if (property.HideLevel.HasFlag(PropertyHideLevel.HideProperty)) + { + continue; + } if (fence.RequiresSeparator) { writer.WriteLine(); } if (!property.HideAccessors) { @@ -91,7 +97,7 @@ public override void Generate() writer.WriteLine($"/// "); writer.WriteLine($"private partial {property.BicepTypeReference} Get{property.Name}DefaultValue();"); } - + // Write the .ctor if (fence.RequiresSeparator) { writer.WriteLine(); } writer.WriteLine($"/// "); @@ -120,6 +126,10 @@ public override void Generate() } foreach (Property property in Properties) { + if (property.HideLevel.HasFlag(PropertyHideLevel.HideField)) + { + continue; // Skip hidden properties + } writer.Write($"{property.FieldName} = "); if (property.PropertyType is SimpleModel || property.PropertyType is Resource) { diff --git a/sdk/provisioning/Generator/src/Model/Specification.Analyze.cs b/sdk/provisioning/Generator/src/Model/Specification.Analyze.cs index 1a64f2d150df..9785818ec50d 100644 --- a/sdk/provisioning/Generator/src/Model/Specification.Analyze.cs +++ b/sdk/provisioning/Generator/src/Model/Specification.Analyze.cs @@ -4,6 +4,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Reflection; using System.Threading; @@ -11,6 +12,7 @@ using Azure.ResourceManager; using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Generator.Model; namespace Azure.Provisioning.Generator.Model; @@ -145,7 +147,7 @@ [.. data.ApiVersions.OrderDescending().Where((v, i) => }); } - private Dictionary FindConstructibleResources() + protected virtual Dictionary FindConstructibleResources() { // Find constructible resources Dictionary resources = []; @@ -332,14 +334,15 @@ private static Property GetProperty(Resource resource, TypeModel parent, bool re GetOrCreateModelType(property.PropertyType, resource), property, armParameter: null) - { - IsReadOnly = !required && !property.CanWrite, - IsRequired = required, - Description = resource.Spec!.DocComments.GetSummary(property) - }; + { + IsReadOnly = !required && !property.CanWrite, + IsRequired = required, + Description = resource.Spec!.DocComments.GetSummary(property) + }; // Fish out any path attributes - string? path = property.GetCustomAttributes().Where(a => a.GetType().Name == "WirePathAttribute").FirstOrDefault()?.ToString(); + var attributes = property.GetCustomAttributes(); + string? path = attributes.Where(a => a.GetType().Name == "WirePathAttribute").FirstOrDefault()?.ToString(); if (path is not null) { prop.Path = path.Split('.'); @@ -359,6 +362,13 @@ private static Property GetProperty(Resource resource, TypeModel parent, bool re }; } + // if the property has `EditorBrowsable` attribute, we should add the same attribute to it as well + var editorBrowsableAttribute = attributes.FirstOrDefault(a => a.GetType() == typeof(EditorBrowsableAttribute)); + if (editorBrowsableAttribute is not null) + { + prop.HideLevel = PropertyHideLevel.HideProperty | PropertyHideLevel.HideField; + } + // Collections always appear readonly so we should look at whether the // value is mutable to determine whether we can set it. if (prop.PropertyType is ListModel) @@ -515,7 +525,7 @@ ModelBase CreateSimpleModel(Type armType) } } } - + return model; } } diff --git a/sdk/provisioning/Generator/src/Model/Specification.Files.cs b/sdk/provisioning/Generator/src/Model/Specification.Files.cs index 502378107508..279587faa2fc 100644 --- a/sdk/provisioning/Generator/src/Model/Specification.Files.cs +++ b/sdk/provisioning/Generator/src/Model/Specification.Files.cs @@ -2,13 +2,7 @@ // Licensed under the MIT License. using System; -using System.Collections.Generic; -using System.Data; using System.IO; -using System.Linq; -using System.Reflection; -using Azure.Identity; -using Azure.ResourceManager; namespace Azure.Provisioning.Generator.Model; diff --git a/sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs b/sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs index 22d57c9ae4b1..648ee725ce98 100644 --- a/sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/AppServiceSpecification.cs @@ -4,7 +4,10 @@ using Azure.Provisioning.Generator.Model; using Azure.ResourceManager.AppService; using Azure.ResourceManager.AppService.Models; -using Azure.ResourceManager.Sql.Models; +using Generator.Model; +using System; +using System.Collections.Generic; +using System.Reflection; namespace Azure.Provisioning.Generator.Specifications; @@ -43,15 +46,23 @@ protected override void Customize() RemoveProperty("ResourceType"); RemoveProperty("Thumbprint"); - // Patch models + CustomizeResource(r => + { + r.ResourceType = "Microsoft.Web/sites/config"; + }); + CustomizeProperty("Name", p => { p.GenerateDefaultValue = true; p.HideAccessors = true; p.IsReadOnly = false; }); // must be `authsettingsV2` // Not generated today: // CustomizePropertyIsoDuration("BlobDuration"); // CustomizePropertyIsoDuration("BlobDuration"); + CustomizeProperty("InstanceCount", p => { p.HideLevel = PropertyHideLevel.HideProperty; }); + CustomizeProperty("MaximumInstanceCount", p => { p.HideLevel = PropertyHideLevel.HideProperty; }); + CustomizeProperty("InstanceMemoryMB", p => { p.HideLevel = PropertyHideLevel.HideProperty; }); + CustomizeProperty("HttpPerInstanceConcurrency", p => { p.HideLevel = PropertyHideLevel.HideProperty; }); // 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); + AddNameRequirements(min: 1, max: 60, lower: true, upper: true, digits: true, hyphen: true); AddNameRequirements(min: 2, max: 60, lower: true, upper: true, digits: true, hyphen: true); AddNameRequirements(min: 2, max: 59, lower: true, upper: true, digits: true, hyphen: true); AddNameRequirements(min: 2, max: 64, lower: true, upper: true, digits: true, hyphen: true, underscore: true, period: true); @@ -60,4 +71,12 @@ protected override void Customize() Roles.Add(new Role("WebPlanContributor", "2cc479cb-7b4d-49a8-b449-8c00fd0f0a4b", "Manage the web plans for websites. Does not allow you to assign roles in Azure RBAC.")); Roles.Add(new Role("WebsiteContributor", "de139f84-1756-47ae-9be6-808fbbe84772", "Manage websites, but not web plans. Does not allow you to assign roles in Azure RBAC.")); } + + protected override Dictionary FindConstructibleResources() + { + // Add missing resources + var dict = base.FindConstructibleResources(); + dict.Add(typeof(SiteAuthSettingsV2), typeof(WebSiteResource).GetMethod("UpdateAuthSettingsV2")!); + return dict; + } } diff --git a/sdk/provisioning/Generator/src/Specifications/ContainerServiceSpecification.cs b/sdk/provisioning/Generator/src/Specifications/ContainerServiceSpecification.cs index cf0043cccf6d..faf27009b46f 100644 --- a/sdk/provisioning/Generator/src/Specifications/ContainerServiceSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/ContainerServiceSpecification.cs @@ -4,6 +4,7 @@ using Azure.Provisioning.Generator.Model; using Azure.ResourceManager.ContainerService; using Azure.ResourceManager.ContainerService.Models; +using Generator.Model; namespace Azure.Provisioning.Generator.Specifications; @@ -27,10 +28,11 @@ protected override void Customize() CustomizeProperty("ResourceIdentityType", p => p.Path = ["type"]); CustomizeProperty("UserAssignedIdentities", p => p.Path = ["userAssignedIdentities"]); CustomizeProperty("DelegatedResources", p => p.Path = ["delegatedResources"]); - CustomizeProperty("IsDiskCsiDriverEnabled", p => p.Path = ["diskCSIDriver"]); - CustomizeProperty("IsFileCsiDriverEnabled", p => p.Path = ["fileCSIDriver"]); - CustomizeProperty("IsSnapshotControllerEnabled", p => p.Path = ["snapshotController"]); - CustomizeProperty("IsBlobCsiDriverEnabled", p => p.Path = ["blobCSIDriver"]); + // these properties are incorrectly hidden in mgmt SDK + CustomizeProperty("IsDiskCsiDriverEnabled", p => { p.HideLevel = PropertyHideLevel.DoNotHide; p.Path = ["diskCSIDriver", "enabled"]; }); + CustomizeProperty("IsFileCsiDriverEnabled", p => { p.HideLevel = PropertyHideLevel.DoNotHide; p.Path = ["fileCSIDriver", "enabled"]; }); + CustomizeProperty("IsSnapshotControllerEnabled", p => { p.HideLevel = PropertyHideLevel.DoNotHide; p.Path = ["snapshotController", "enabled"]; }); + CustomizeProperty("IsBlobCsiDriverEnabled", p => { p.HideLevel = PropertyHideLevel.DoNotHide; p.Path = ["blobCSIDriver", "enabled"]; }); // Naming requirements AddNameRequirements(min: 1, max: 63, lower: true, upper: true, digits: true, hyphen: true, underscore: true); diff --git a/sdk/provisioning/Generator/src/Specifications/SearchSpecification.cs b/sdk/provisioning/Generator/src/Specifications/SearchSpecification.cs index f0174baf1b8e..d982be565a3f 100644 --- a/sdk/provisioning/Generator/src/Specifications/SearchSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/SearchSpecification.cs @@ -6,6 +6,7 @@ using Azure.Provisioning.Generator.Model; using Azure.ResourceManager.Search; using Azure.ResourceManager.Search.Models; +using Generator.Model; namespace Azure.Provisioning.Generator.Specifications; @@ -26,6 +27,8 @@ protected override void Customize() RemoveModel(); RemoveProperty("SharedPrivateLinkResourceStatus"); RemoveProperty("SharedPrivateLinkResourceProvisioningState"); + CustomizeProperty("Status", p => p.HideLevel = PropertyHideLevel.DoNotHide); + CustomizeProperty("ProvisioningState", p => p.HideLevel = PropertyHideLevel.DoNotHide); // Patch models CustomizeEnum(e => { foreach (EnumValue member in e.Values) { member.Value = member.Name; } }); diff --git a/sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs b/sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs index 0715bfd43f59..81757b3a1da2 100644 --- a/sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs +++ b/sdk/provisioning/Generator/src/Specifications/StorageSpecification.cs @@ -4,6 +4,7 @@ using Azure.Provisioning.Generator.Model; using Azure.ResourceManager.Storage; using Azure.ResourceManager.Storage.Models; +using Generator.Model; namespace Azure.Provisioning.Generator.Specifications; @@ -24,6 +25,7 @@ protected override void Customize() CustomizeProperty("Value", p => p.IsSecure = true); CustomizeProperty("SharedKey", p => p.IsSecure = true); CustomizeProperty("Key", p => p.IsSecure = true); + CustomizeProperty("ProvisioningState", p => p.HideLevel = PropertyHideLevel.HideProperty); // Naming requirements AddNameRequirements(min: 3, max: 24, lower: true, digits: true); diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Azure.ResourceManager.PureStorageBlock.sln b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Azure.ResourceManager.PureStorageBlock.sln index 70e40fe181ae..988a7f071ba9 100644 --- a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Azure.ResourceManager.PureStorageBlock.sln +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Azure.ResourceManager.PureStorageBlock.sln @@ -2,8 +2,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29709.97 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.PureStorageBlock.Samples", "samples\Azure.ResourceManager.PureStorageBlock.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.PureStorageBlock", "src\Azure.ResourceManager.PureStorageBlock.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.PureStorageBlock.Tests", "tests\Azure.ResourceManager.PureStorageBlock.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj deleted file mode 100644 index 70d5c9f46c03..000000000000 --- a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsStorageContainerCollection.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerCollection.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsStorageContainerCollection.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsStorageContainerResource.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerResource.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsStorageContainerResource.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeCollection.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeCollection.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeCollection.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeResource.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeResource.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeResource.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsVmCollection.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmCollection.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsVmCollection.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsVmResource.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmResource.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsVmResource.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsVmVolumeCollection.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeCollection.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsVmVolumeCollection.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsVmVolumeResource.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeResource.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageAvsVmVolumeResource.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStoragePoolCollection.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolCollection.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStoragePoolCollection.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStoragePoolResource.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolResource.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStoragePoolResource.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageReservationResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageReservationResource.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageReservationResource.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_PureStorageReservationResource.cs diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationEventCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationEventCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationEventResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationEventResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationExtensionCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationExtensionCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationExtensionResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationExtensionResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationFabricAgentCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationFabricAgentCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationFabricAgentResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationFabricAgentResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationFabricCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationFabricCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationFabricResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationFabricResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationJobCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationJobCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationJobResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationJobResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPolicyCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPolicyCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPolicyResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPolicyResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateLinkResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateLinkResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResourceCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateLinkResourceCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResourceCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationPrivateLinkResourceCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationVaultCollection.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationVaultCollection.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationVaultResource.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_DataReplicationVaultResource.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.net8.0.cs b/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.net8.0.cs index 0fbb52cc9775..7ecd5dc5c10a 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.net8.0.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.net8.0.cs @@ -2655,6 +2655,7 @@ namespace Microsoft.Extensions.Azure public static partial class ArmClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddArmClient(this TBuilder builder, string defaultSubscription) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddArmClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Extensions/ArmClientBuilderExtensions.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Extensions/ArmClientBuilderExtensions.cs index 68d87da0d8a8..be63ac48dd4f 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Extensions/ArmClientBuilderExtensions.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Extensions/ArmClientBuilderExtensions.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.ResourceManager; @@ -23,6 +24,8 @@ public static IAzureClientBuilder AddArmClient /// Registers an 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 AddArmClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/ManagementGroup/Generated/Samples/Sample_ManagementGroupCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/ManagementGroup/Generated/Samples/Sample_ManagementGroupCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/ManagementGroup/Generated/Samples/Sample_ManagementGroupResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/ManagementGroup/Generated/Samples/Sample_ManagementGroupResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupSubscriptionCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/ManagementGroup/Generated/Samples/Sample_ManagementGroupSubscriptionCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupSubscriptionCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/ManagementGroup/Generated/Samples/Sample_ManagementGroupSubscriptionCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupSubscriptionResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/ManagementGroup/Generated/Samples/Sample_ManagementGroupSubscriptionResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupSubscriptionResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/ManagementGroup/Generated/Samples/Sample_ManagementGroupSubscriptionResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_DataPolicyManifestCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_DataPolicyManifestCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_DataPolicyManifestCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_DataPolicyManifestCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_DataPolicyManifestResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_DataPolicyManifestResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_DataPolicyManifestResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_DataPolicyManifestResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_FeatureCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_FeatureCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_FeatureCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_FeatureCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_FeatureResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_FeatureResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_FeatureResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_FeatureResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupPolicyDefinitionCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementGroupPolicyDefinitionCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupPolicyDefinitionCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementGroupPolicyDefinitionCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupPolicyDefinitionResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementGroupPolicyDefinitionResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupPolicyDefinitionResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementGroupPolicyDefinitionResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupPolicySetDefinitionCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementGroupPolicySetDefinitionCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupPolicySetDefinitionCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementGroupPolicySetDefinitionCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupPolicySetDefinitionResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementGroupPolicySetDefinitionResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementGroupPolicySetDefinitionResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementGroupPolicySetDefinitionResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementLockCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementLockCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementLockCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementLockCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementLockResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementLockResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ManagementLockResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ManagementLockResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_PolicyAssignmentCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_PolicyAssignmentCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_PolicyAssignmentCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_PolicyAssignmentCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_PolicyAssignmentResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_PolicyAssignmentResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_PolicyAssignmentResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_PolicyAssignmentResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ResourceGroupCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ResourceGroupCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ResourceGroupCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ResourceGroupCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ResourceGroupResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ResourceGroupResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ResourceGroupResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ResourceGroupResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ResourceProviderCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ResourceProviderCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ResourceProviderCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ResourceProviderCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ResourceProviderResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ResourceProviderResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_ResourceProviderResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_ResourceProviderResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionPolicyDefinitionCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionPolicyDefinitionCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionPolicyDefinitionCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionPolicyDefinitionCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionPolicyDefinitionResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionPolicyDefinitionResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionPolicyDefinitionResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionPolicyDefinitionResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionPolicySetDefinitionCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionPolicySetDefinitionCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionPolicySetDefinitionCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionPolicySetDefinitionCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionPolicySetDefinitionResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionPolicySetDefinitionResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionPolicySetDefinitionResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionPolicySetDefinitionResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_SubscriptionResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_SubscriptionResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TagResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TagResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TagResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TagResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantPolicyDefinitionCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantPolicyDefinitionCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantPolicyDefinitionCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantPolicyDefinitionCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantPolicyDefinitionResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantPolicyDefinitionResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantPolicyDefinitionResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantPolicyDefinitionResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantPolicySetDefinitionCollection.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantPolicySetDefinitionCollection.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantPolicySetDefinitionCollection.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantPolicySetDefinitionCollection.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantPolicySetDefinitionResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantPolicySetDefinitionResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantPolicySetDefinitionResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantPolicySetDefinitionResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantResource.cs b/sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager/samples/Generated/Samples/Sample_TenantResource.cs rename to sdk/resourcemanager/Azure.ResourceManager/tests/Resources/Generated/Samples/Sample_TenantResource.cs diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 023f426435be..75de9d9e649f 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -159,6 +159,7 @@ trigger: - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - sdk/peering/Azure.ResourceManager.Peering - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB + - sdk/PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot @@ -383,6 +384,7 @@ pr: - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - sdk/peering/Azure.ResourceManager.Peering - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB + - sdk/PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot diff --git a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.net8.0.cs b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.net8.0.cs index bab6f126c7b9..1680639f03dd 100644 --- a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.net8.0.cs +++ b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.net8.0.cs @@ -4691,10 +4691,13 @@ namespace Microsoft.Extensions.Azure public static partial class SearchClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddSearchClient(this TBuilder builder, System.Uri endpoint, string indexName, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddSearchClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexerClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexerClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs b/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs index 307727734f5c..5c21301dfcae 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.Core.Extensions; using Azure.Search.Documents; @@ -57,6 +58,8 @@ public static IAzureClientBuilder AddSearchCl /// The client factory builder. /// The client configuration. /// An Azure client builder. + [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 AddSearchClient( this TBuilder builder, TConfiguration configuration) @@ -100,6 +103,8 @@ public static IAzureClientBuilder AddSea /// The client factory builder. /// The client configuration. /// An Azure client builder. + [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 AddSearchIndexClient( this TBuilder builder, TConfiguration configuration) @@ -143,6 +148,8 @@ public static IAzureClientBuilder AddS /// The client factory builder. /// The client configuration. /// An Azure client builder. + [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 AddSearchIndexerClient( this TBuilder builder, TConfiguration configuration) diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Azure.ResourceManager.SecretsStoreExtension.sln b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Azure.ResourceManager.SecretsStoreExtension.sln index 317677ff72eb..35bd00a7e5ad 100644 --- a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Azure.ResourceManager.SecretsStoreExtension.sln +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Azure.ResourceManager.SecretsStoreExtension.sln @@ -7,8 +7,6 @@ Project("{D0FBE41C-560C-4177-BE60-69FED9C45138}") = "Azure.ResourceManager.Secre EndProject Project("{D0FBE41C-560C-4177-BE60-69FED9C45138}") = "Azure.ResourceManager.SecretsStoreExtension.Tests", "tests\Azure.ResourceManager.SecretsStoreExtension.Tests.csproj", "{B47075CB-602A-4CD4-A474-1E21D0A295DA}" EndProject -Project("{D0FBE41C-560C-4177-BE60-69FED9C45138}") = "Azure.ResourceManager.SecretsStoreExtension.Samples", "samples\Azure.ResourceManager.SecretsStoreExtension.Samples.csproj", "{CFC694E3-252D-4AC4-A53C-107ED087F500}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Azure.ResourceManager.SecretsStoreExtension.Samples.csproj b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Azure.ResourceManager.SecretsStoreExtension.Samples.csproj deleted file mode 100644 index 398d1d482aec..000000000000 --- a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Azure.ResourceManager.SecretsStoreExtension.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassCollection.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_KeyVaultSecretProviderClassCollection.cs similarity index 100% rename from sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassCollection.cs rename to sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_KeyVaultSecretProviderClassCollection.cs diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassResource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_KeyVaultSecretProviderClassResource.cs similarity index 100% rename from sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassResource.cs rename to sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_KeyVaultSecretProviderClassResource.cs diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncCollection.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_SecretSyncCollection.cs similarity index 100% rename from sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncCollection.cs rename to sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_SecretSyncCollection.cs diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncResource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_SecretSyncResource.cs similarity index 100% rename from sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncResource.cs rename to sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_SecretSyncResource.cs diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/CHANGELOG.md index b491dac26858..3753e0a5369b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.3.0-beta.3 (Unreleased) +## 1.3.0-beta.4 (Unreleased) ### Features Added @@ -10,6 +10,24 @@ ### Other Changes +## 1.3.0-beta.3 (2025-06-23) + +### Features Added + +- Upgraded api-version tag from 'package-2024-09-preview' to 'package-2025-03-preview'. Tag details available at https://github.com/Azure/azure-rest-api-specs/blob/57ce30e761ef4d39e81471cfb732f39043f0b278/specification/servicefabricmanagedclusters/resource-manager/readme.md. + +Cluster features +- Fault simulation operations +- AllocatedOutboundPorts +- VMImage + +Nodetype features +- Fault simulation operations +- New DiskTypes options PremiumV2_LRS, StandardSSD_ZRS, Premium_ZRS +- SecurityEncryptionType +- New actions Deallocate, Start, Redeploy +- ZoneBalance + ## 1.3.0-beta.2 (2024-11-21) ### Features Added diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.net8.0.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.net8.0.cs index 454fab20d2b7..ec5c8ceb0490 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.net8.0.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.net8.0.cs @@ -246,6 +246,7 @@ public ServiceFabricManagedClusterData(Azure.Core.AzureLocation location, Azure. public string SubnetId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy UpgradeDescription { get { throw null; } set { } } public bool? UseCustomVnet { get { throw null; } set { } } + public string VmImage { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? ZonalUpdateMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -267,6 +268,10 @@ protected ServiceFabricManagedClusterResource() { } 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 GetFaultSimulation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetFaultSimulation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaultSimulationAsync(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFaultSimulationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedAzResiliencyStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetManagedAzResiliencyStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedMaintenanceWindowStatu(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -288,6 +293,10 @@ protected ServiceFabricManagedClusterResource() { } 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; } + public virtual Azure.ResourceManager.ArmOperation StartFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -365,11 +374,13 @@ public ServiceFabricManagedNodeTypeData() { } public bool? IsSecureBootEnabled { get { throw null; } set { } } public bool? IsSpotVm { get { throw null; } set { } } public bool? IsStateless { get { throw null; } set { } } + public bool? IsZoneBalanceEnabled { get { throw null; } set { } } public System.Collections.Generic.IList NatConfigurations { get { throw null; } } public Azure.Core.ResourceIdentifier NatGatewayId { get { throw null; } set { } } public System.Collections.Generic.IList NetworkSecurityRules { get { throw null; } } public System.Collections.Generic.IDictionary PlacementProperties { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType? SecurityEncryptionType { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? SecurityType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ServiceArtifactReferenceId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku Sku { get { throw null; } set { } } @@ -410,6 +421,8 @@ protected ServiceFabricManagedNodeTypeResource() { } 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 clusterName, string nodeTypeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Deallocate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.ResourceManager.ArmOperation DeleteNode(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -418,6 +431,12 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAvailableSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFaultSimulation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetFaultSimulation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaultSimulationAsync(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFaultSimulationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Redeploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RedeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ReimageAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, 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; } @@ -426,6 +445,12 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual System.Threading.Tasks.Task RestartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, 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; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -589,24 +614,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ArmServiceFabricManagedClustersModelFactory { + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation FaultSimulation(string simulationId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? status = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails details = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails FaultSimulationDetails(string clusterId = null, string operationId = null, System.Collections.Generic.IEnumerable nodeTypeFaultSimulation = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent parameters = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedAzResiliencyStatus ManagedAzResiliencyStatus(System.Collections.Generic.IEnumerable baseResourceStatus = null, bool? isClusterZoneResilient = default(bool?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedMaintenanceWindowStatus ManagedMaintenanceWindowStatus(bool? isWindowEnabled = default(bool?), bool? isRegionReady = default(bool?), bool? isWindowActive = default(bool?), bool? canApplyUpdates = default(bool?), System.DateTimeOffset? lastWindowStatusUpdatedOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastWindowStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastWindowEndOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties ManagedServiceProperties(string placementConstraints = null, System.Collections.Generic.IEnumerable correlationScheme = null, System.Collections.Generic.IEnumerable serviceLoadMetrics = null, System.Collections.Generic.IEnumerable servicePlacementPolicies = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost? defaultMoveCost = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost?), System.Collections.Generic.IEnumerable scalingPolicies = null, string provisioningState = null, string serviceKind = null, string serviceTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme partitionDescription = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? servicePackageActivationMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode?), string serviceDnsName = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeAvailableSku NodeTypeAvailableSku(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku sku = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity capacity = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation NodeTypeFaultSimulation(string nodeTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? status = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus?), string operationId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus? operationStatus = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity NodeTypeSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType? scaleType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku NodeTypeSupportedSku(string name = null, string tier = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, string publisher = null, string vmssExtensionPropertiesType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, string forceUpdateTag = null, System.Collections.Generic.IEnumerable provisionAfterExtensions = null, string provisioningState = null, bool? isAutomaticUpgradeEnabled = default(bool?), System.Collections.Generic.IEnumerable setupOrder = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ResourceAzStatus ResourceAzStatus(string resourceName = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), bool? isZoneResilient = default(bool?), string details = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(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.Models.ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy upgradePolicy = null, System.Collections.Generic.IEnumerable managedIdentities = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(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 managedIdentities = null, string provisioningState = null, string version = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy upgradePolicy = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(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.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(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, System.Uri appPackageUri = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(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.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName, string dnsName, string fqdn, System.Net.IPAddress ipv4Address, System.Guid? clusterId, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState, System.Collections.Generic.IEnumerable clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, System.Collections.Generic.IEnumerable loadBalancingRules, bool? isRdpAccessAllowed, System.Collections.Generic.IEnumerable networkSecurityRules, System.Collections.Generic.IEnumerable clients, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory, System.Collections.Generic.IEnumerable fabricSettings, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence, System.Collections.Generic.IEnumerable addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, int? maxUnusedVersionsToKeep, bool? isIPv6Enabled, string subnetId, System.Collections.Generic.IEnumerable ipTags, System.Net.IPAddress ipv6Address, bool? isServicePublicIPEnabled, System.Collections.Generic.IEnumerable auxiliarySubnets, System.Collections.Generic.IEnumerable serviceEndpoints, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, Azure.Core.ResourceIdentifier publicIPPrefixId, Azure.Core.ResourceIdentifier publicIPv6PrefixId, Azure.Core.ResourceIdentifier ddosProtectionPlanId, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, Azure.ETag? etag) { throw null; } - public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(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.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName?), string dnsName = null, string fqdn = null, System.Net.IPAddress ipv4Address = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState?), System.Collections.Generic.IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminUserName = null, string adminPassword = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = default(bool?), System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable clients = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory = null, System.Collections.Generic.IEnumerable fabricSettings = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), string clusterCodeVersion = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence?), System.Collections.Generic.IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = default(bool?), bool? hasZoneResiliency = default(bool?), int? maxUnusedVersionsToKeep = default(int?), bool? isIPv6Enabled = default(bool?), string subnetId = null, System.Collections.Generic.IEnumerable ipTags = null, System.Net.IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = default(bool?), System.Collections.Generic.IEnumerable auxiliarySubnets = null, System.Collections.Generic.IEnumerable serviceEndpoints = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode?), bool? useCustomVnet = default(bool?), Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier publicIPv6PrefixId = null, Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = default(int?), bool? isHttpGatewayExclusiveAuthModeEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope?), int? allocatedOutboundPorts = default(int?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(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 dnsName = null, string fqdn = null, System.Net.IPAddress ipv4Address = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState?), System.Collections.Generic.IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminUserName = null, string adminPassword = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = default(bool?), System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable clients = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory = null, System.Collections.Generic.IEnumerable fabricSettings = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), string clusterCodeVersion = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence?), System.Collections.Generic.IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = default(bool?), bool? hasZoneResiliency = default(bool?), int? maxUnusedVersionsToKeep = default(int?), bool? isIPv6Enabled = default(bool?), string subnetId = null, System.Collections.Generic.IEnumerable ipTags = null, System.Net.IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = default(bool?), System.Collections.Generic.IEnumerable auxiliarySubnets = null, System.Collections.Generic.IEnumerable serviceEndpoints = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode?), bool? useCustomVnet = default(bool?), Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier publicIPv6PrefixId = null, Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = default(int?), bool? isHttpGatewayExclusiveAuthModeEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope?), int? allocatedOutboundPorts = default(int?), string vmImage = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string clusterCodeVersion = null, System.DateTimeOffset? versionSupportExpireOn = default(System.DateTimeOffset?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType? osType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, System.Collections.Generic.IDictionary placementProperties, System.Collections.Generic.IDictionary capacities, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, System.Collections.Generic.IEnumerable vmSecrets, System.Collections.Generic.IEnumerable vmExtensions, System.Collections.Generic.IEnumerable userAssignedIdentities, bool? isStateless, bool? hasMultiplePlacementGroups, System.Collections.Generic.IEnumerable frontendConfigurations, System.Collections.Generic.IEnumerable networkSecurityRules, System.Collections.Generic.IEnumerable additionalDataDisks, bool? isEncryptionAtHostEnabled, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, System.Collections.Generic.IEnumerable zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy, Azure.Core.ResourceIdentifier vmImageResourceId, Azure.Core.ResourceIdentifier subnetId, System.Collections.Generic.IEnumerable vmSetupActions, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, Azure.Core.ResourceIdentifier vmSharedGalleryImageId, Azure.Core.ResourceIdentifier natGatewayId, System.Collections.Generic.IEnumerable natConfigurations, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan, Azure.Core.ResourceIdentifier serviceArtifactReferenceId, Azure.Core.ResourceIdentifier dscpConfigurationId, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations, string computerNamePrefix, System.Collections.Generic.IDictionary tags) { throw null; } - public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku = null, bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeInGB = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType?), string dataDiskLetter = null, System.Collections.Generic.IDictionary placementProperties = null, System.Collections.Generic.IDictionary capacities = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, System.Collections.Generic.IEnumerable vmSecrets = null, System.Collections.Generic.IEnumerable vmExtensions = null, System.Collections.Generic.IEnumerable userAssignedIdentities = null, bool? isStateless = default(bool?), bool? hasMultiplePlacementGroups = default(bool?), System.Collections.Generic.IEnumerable frontendConfigurations = null, System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), bool? isAcceleratedNetworkingEnabled = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? isOverProvisioningEnabled = default(bool?), System.Collections.Generic.IEnumerable zones = null, bool? isSpotVm = default(bool?), string hostGroupId = null, bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType?), Azure.Core.ResourceIdentifier vmImageResourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Collections.Generic.IEnumerable vmSetupActions = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType?), bool? isSecureBootEnabled = default(bool?), bool? isNodePublicIPEnabled = default(bool?), bool? isNodePublicIPv6Enabled = default(bool?), Azure.Core.ResourceIdentifier vmSharedGalleryImageId = null, Azure.Core.ResourceIdentifier natGatewayId = null, System.Collections.Generic.IEnumerable natConfigurations = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.Core.ResourceIdentifier dscpConfigurationId = null, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, System.Collections.Generic.IEnumerable vmApplications = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeInGB = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType?), string dataDiskLetter = null, System.Collections.Generic.IDictionary placementProperties = null, System.Collections.Generic.IDictionary capacities = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, System.Collections.Generic.IEnumerable vmSecrets = null, System.Collections.Generic.IEnumerable vmExtensions = null, System.Collections.Generic.IEnumerable userAssignedIdentities = null, bool? isStateless = default(bool?), bool? hasMultiplePlacementGroups = default(bool?), System.Collections.Generic.IEnumerable frontendConfigurations = null, System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), bool? isAcceleratedNetworkingEnabled = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? isOverProvisioningEnabled = default(bool?), System.Collections.Generic.IEnumerable zones = null, bool? isSpotVm = default(bool?), string hostGroupId = null, bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType?), Azure.Core.ResourceIdentifier vmImageResourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Collections.Generic.IEnumerable vmSetupActions = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType? securityEncryptionType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType?), bool? isSecureBootEnabled = default(bool?), bool? isNodePublicIPEnabled = default(bool?), bool? isNodePublicIPv6Enabled = default(bool?), Azure.Core.ResourceIdentifier vmSharedGalleryImageId = null, Azure.Core.ResourceIdentifier natGatewayId = null, System.Collections.Generic.IEnumerable natConfigurations = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.Core.ResourceIdentifier dscpConfigurationId = null, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, System.Collections.Generic.IEnumerable vmApplications = null, bool? isZoneBalanceEnabled = default(bool?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedServiceData ServiceFabricManagedServiceData(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.ServiceFabricManagedClusters.Models.ManagedServiceProperties properties = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string vmSize = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, System.Collections.Generic.IEnumerable correlationScheme = null, System.Collections.Generic.IEnumerable serviceLoadMetrics = null, System.Collections.Generic.IEnumerable servicePlacementPolicies = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost? defaultMoveCost = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost?), System.Collections.Generic.IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme partitionDescription = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? servicePackageActivationMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode?), string serviceDnsName = null, bool? hasPersistedState = default(bool?), int? targetReplicaSetSize = default(int?), int? minReplicaSetSize = default(int?), System.TimeSpan? replicaRestartWaitDuration = default(System.TimeSpan?), System.TimeSpan? quorumLossWaitDuration = default(System.TimeSpan?), System.TimeSpan? standByReplicaKeepDuration = default(System.TimeSpan?), System.TimeSpan? servicePlacementTimeLimit = default(System.TimeSpan?)) { throw null; } @@ -697,6 +726,91 @@ 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 FaultSimulation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaultSimulation() { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails Details { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string SimulationId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation 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 FaultSimulationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected FaultSimulationContent() { } + public System.DateTimeOffset? ConstraintsExpireOn { get { throw null; } set { } } + public bool? IsForced { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent 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 FaultSimulationContentWrapper : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FaultSimulationContentWrapper(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent parameters) { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper 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 FaultSimulationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaultSimulationDetails() { } + public string ClusterId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NodeTypeFaultSimulation { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails 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 FaultSimulationIdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FaultSimulationIdContent(string simulationId) { } + public string SimulationId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent 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 FaultSimulationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaultSimulationStatus(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Active { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Done { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus StartFailed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Starting { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus StopFailed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus 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.ServiceFabricManagedClusters.Models.FaultSimulationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class ManagedAzResiliencyStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ManagedAzResiliencyStatus() { } @@ -1229,6 +1343,20 @@ 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 NodeTypeFaultSimulation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NodeTypeFaultSimulation() { } + public string NodeTypeName { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus? OperationStatus { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation 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 NodeTypeFrontendConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NodeTypeFrontendConfiguration() { } @@ -1274,6 +1402,24 @@ 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 NodeTypeSecurityEncryptionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NodeTypeSecurityEncryptionType(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType DiskWithVmGuestState { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType VmGuestStateOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType 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.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class NodeTypeSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NodeTypeSku(int capacity) { } @@ -1615,6 +1761,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ServiceFabricManagedClusterSecurityType(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType ConfidentialVm { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType Standard { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType TrustedLaunch { get { throw null; } } public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType other) { throw null; } @@ -1716,6 +1863,9 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write private readonly int _dummyPrimitive; public ServiceFabricManagedDataDiskType(string value) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumLrs { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumV2LRS { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumZrs { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumZRS { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType StandardLrs { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType StandardSsdLrs { get { throw null; } } public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType other) { throw null; } @@ -1974,6 +2124,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; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SfmcOperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SfmcOperationStatus(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Aborted { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Created { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Started { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus 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.ServiceFabricManagedClusters.Models.SfmcOperationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class SingletonPartitionScheme : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SingletonPartitionScheme() { } @@ -2112,4 +2284,15 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode right) { throw null; } public override string ToString() { throw null; } } + public partial class ZoneFaultSimulationContent : Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ZoneFaultSimulationContent() { } + 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.ServiceFabricManagedClusters.Models.ZoneFaultSimulationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZoneFaultSimulationContent 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; } + } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs index 454fab20d2b7..ec5c8ceb0490 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs @@ -246,6 +246,7 @@ public ServiceFabricManagedClusterData(Azure.Core.AzureLocation location, Azure. public string SubnetId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy UpgradeDescription { get { throw null; } set { } } public bool? UseCustomVnet { get { throw null; } set { } } + public string VmImage { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? ZonalUpdateMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -267,6 +268,10 @@ protected ServiceFabricManagedClusterResource() { } 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 GetFaultSimulation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetFaultSimulation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaultSimulationAsync(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFaultSimulationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedAzResiliencyStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetManagedAzResiliencyStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedMaintenanceWindowStatu(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -288,6 +293,10 @@ protected ServiceFabricManagedClusterResource() { } 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; } + public virtual Azure.ResourceManager.ArmOperation StartFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -365,11 +374,13 @@ public ServiceFabricManagedNodeTypeData() { } public bool? IsSecureBootEnabled { get { throw null; } set { } } public bool? IsSpotVm { get { throw null; } set { } } public bool? IsStateless { get { throw null; } set { } } + public bool? IsZoneBalanceEnabled { get { throw null; } set { } } public System.Collections.Generic.IList NatConfigurations { get { throw null; } } public Azure.Core.ResourceIdentifier NatGatewayId { get { throw null; } set { } } public System.Collections.Generic.IList NetworkSecurityRules { get { throw null; } } public System.Collections.Generic.IDictionary PlacementProperties { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType? SecurityEncryptionType { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? SecurityType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ServiceArtifactReferenceId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku Sku { get { throw null; } set { } } @@ -410,6 +421,8 @@ protected ServiceFabricManagedNodeTypeResource() { } 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 clusterName, string nodeTypeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Deallocate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.ResourceManager.ArmOperation DeleteNode(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -418,6 +431,12 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAvailableSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFaultSimulation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetFaultSimulation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaultSimulationAsync(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFaultSimulationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Redeploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RedeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ReimageAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, 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; } @@ -426,6 +445,12 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual System.Threading.Tasks.Task RestartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, 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; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -589,24 +614,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ArmServiceFabricManagedClustersModelFactory { + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation FaultSimulation(string simulationId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? status = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails details = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails FaultSimulationDetails(string clusterId = null, string operationId = null, System.Collections.Generic.IEnumerable nodeTypeFaultSimulation = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent parameters = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedAzResiliencyStatus ManagedAzResiliencyStatus(System.Collections.Generic.IEnumerable baseResourceStatus = null, bool? isClusterZoneResilient = default(bool?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedMaintenanceWindowStatus ManagedMaintenanceWindowStatus(bool? isWindowEnabled = default(bool?), bool? isRegionReady = default(bool?), bool? isWindowActive = default(bool?), bool? canApplyUpdates = default(bool?), System.DateTimeOffset? lastWindowStatusUpdatedOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastWindowStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastWindowEndOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties ManagedServiceProperties(string placementConstraints = null, System.Collections.Generic.IEnumerable correlationScheme = null, System.Collections.Generic.IEnumerable serviceLoadMetrics = null, System.Collections.Generic.IEnumerable servicePlacementPolicies = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost? defaultMoveCost = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost?), System.Collections.Generic.IEnumerable scalingPolicies = null, string provisioningState = null, string serviceKind = null, string serviceTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme partitionDescription = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? servicePackageActivationMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode?), string serviceDnsName = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeAvailableSku NodeTypeAvailableSku(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku sku = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity capacity = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation NodeTypeFaultSimulation(string nodeTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? status = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus?), string operationId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus? operationStatus = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity NodeTypeSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType? scaleType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku NodeTypeSupportedSku(string name = null, string tier = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, string publisher = null, string vmssExtensionPropertiesType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, string forceUpdateTag = null, System.Collections.Generic.IEnumerable provisionAfterExtensions = null, string provisioningState = null, bool? isAutomaticUpgradeEnabled = default(bool?), System.Collections.Generic.IEnumerable setupOrder = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ResourceAzStatus ResourceAzStatus(string resourceName = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), bool? isZoneResilient = default(bool?), string details = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(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.Models.ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy upgradePolicy = null, System.Collections.Generic.IEnumerable managedIdentities = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(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 managedIdentities = null, string provisioningState = null, string version = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy upgradePolicy = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(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.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(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, System.Uri appPackageUri = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(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.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName, string dnsName, string fqdn, System.Net.IPAddress ipv4Address, System.Guid? clusterId, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState, System.Collections.Generic.IEnumerable clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, System.Collections.Generic.IEnumerable loadBalancingRules, bool? isRdpAccessAllowed, System.Collections.Generic.IEnumerable networkSecurityRules, System.Collections.Generic.IEnumerable clients, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory, System.Collections.Generic.IEnumerable fabricSettings, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence, System.Collections.Generic.IEnumerable addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, int? maxUnusedVersionsToKeep, bool? isIPv6Enabled, string subnetId, System.Collections.Generic.IEnumerable ipTags, System.Net.IPAddress ipv6Address, bool? isServicePublicIPEnabled, System.Collections.Generic.IEnumerable auxiliarySubnets, System.Collections.Generic.IEnumerable serviceEndpoints, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, Azure.Core.ResourceIdentifier publicIPPrefixId, Azure.Core.ResourceIdentifier publicIPv6PrefixId, Azure.Core.ResourceIdentifier ddosProtectionPlanId, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, Azure.ETag? etag) { throw null; } - public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(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.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName?), string dnsName = null, string fqdn = null, System.Net.IPAddress ipv4Address = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState?), System.Collections.Generic.IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminUserName = null, string adminPassword = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = default(bool?), System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable clients = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory = null, System.Collections.Generic.IEnumerable fabricSettings = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), string clusterCodeVersion = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence?), System.Collections.Generic.IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = default(bool?), bool? hasZoneResiliency = default(bool?), int? maxUnusedVersionsToKeep = default(int?), bool? isIPv6Enabled = default(bool?), string subnetId = null, System.Collections.Generic.IEnumerable ipTags = null, System.Net.IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = default(bool?), System.Collections.Generic.IEnumerable auxiliarySubnets = null, System.Collections.Generic.IEnumerable serviceEndpoints = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode?), bool? useCustomVnet = default(bool?), Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier publicIPv6PrefixId = null, Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = default(int?), bool? isHttpGatewayExclusiveAuthModeEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope?), int? allocatedOutboundPorts = default(int?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(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 dnsName = null, string fqdn = null, System.Net.IPAddress ipv4Address = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState?), System.Collections.Generic.IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminUserName = null, string adminPassword = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = default(bool?), System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable clients = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory = null, System.Collections.Generic.IEnumerable fabricSettings = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), string clusterCodeVersion = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence?), System.Collections.Generic.IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = default(bool?), bool? hasZoneResiliency = default(bool?), int? maxUnusedVersionsToKeep = default(int?), bool? isIPv6Enabled = default(bool?), string subnetId = null, System.Collections.Generic.IEnumerable ipTags = null, System.Net.IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = default(bool?), System.Collections.Generic.IEnumerable auxiliarySubnets = null, System.Collections.Generic.IEnumerable serviceEndpoints = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode?), bool? useCustomVnet = default(bool?), Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier publicIPv6PrefixId = null, Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = default(int?), bool? isHttpGatewayExclusiveAuthModeEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope?), int? allocatedOutboundPorts = default(int?), string vmImage = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string clusterCodeVersion = null, System.DateTimeOffset? versionSupportExpireOn = default(System.DateTimeOffset?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType? osType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, System.Collections.Generic.IDictionary placementProperties, System.Collections.Generic.IDictionary capacities, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, System.Collections.Generic.IEnumerable vmSecrets, System.Collections.Generic.IEnumerable vmExtensions, System.Collections.Generic.IEnumerable userAssignedIdentities, bool? isStateless, bool? hasMultiplePlacementGroups, System.Collections.Generic.IEnumerable frontendConfigurations, System.Collections.Generic.IEnumerable networkSecurityRules, System.Collections.Generic.IEnumerable additionalDataDisks, bool? isEncryptionAtHostEnabled, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, System.Collections.Generic.IEnumerable zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy, Azure.Core.ResourceIdentifier vmImageResourceId, Azure.Core.ResourceIdentifier subnetId, System.Collections.Generic.IEnumerable vmSetupActions, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, Azure.Core.ResourceIdentifier vmSharedGalleryImageId, Azure.Core.ResourceIdentifier natGatewayId, System.Collections.Generic.IEnumerable natConfigurations, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan, Azure.Core.ResourceIdentifier serviceArtifactReferenceId, Azure.Core.ResourceIdentifier dscpConfigurationId, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations, string computerNamePrefix, System.Collections.Generic.IDictionary tags) { throw null; } - public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku = null, bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeInGB = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType?), string dataDiskLetter = null, System.Collections.Generic.IDictionary placementProperties = null, System.Collections.Generic.IDictionary capacities = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, System.Collections.Generic.IEnumerable vmSecrets = null, System.Collections.Generic.IEnumerable vmExtensions = null, System.Collections.Generic.IEnumerable userAssignedIdentities = null, bool? isStateless = default(bool?), bool? hasMultiplePlacementGroups = default(bool?), System.Collections.Generic.IEnumerable frontendConfigurations = null, System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), bool? isAcceleratedNetworkingEnabled = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? isOverProvisioningEnabled = default(bool?), System.Collections.Generic.IEnumerable zones = null, bool? isSpotVm = default(bool?), string hostGroupId = null, bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType?), Azure.Core.ResourceIdentifier vmImageResourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Collections.Generic.IEnumerable vmSetupActions = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType?), bool? isSecureBootEnabled = default(bool?), bool? isNodePublicIPEnabled = default(bool?), bool? isNodePublicIPv6Enabled = default(bool?), Azure.Core.ResourceIdentifier vmSharedGalleryImageId = null, Azure.Core.ResourceIdentifier natGatewayId = null, System.Collections.Generic.IEnumerable natConfigurations = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.Core.ResourceIdentifier dscpConfigurationId = null, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, System.Collections.Generic.IEnumerable vmApplications = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeInGB = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType?), string dataDiskLetter = null, System.Collections.Generic.IDictionary placementProperties = null, System.Collections.Generic.IDictionary capacities = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, System.Collections.Generic.IEnumerable vmSecrets = null, System.Collections.Generic.IEnumerable vmExtensions = null, System.Collections.Generic.IEnumerable userAssignedIdentities = null, bool? isStateless = default(bool?), bool? hasMultiplePlacementGroups = default(bool?), System.Collections.Generic.IEnumerable frontendConfigurations = null, System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), bool? isAcceleratedNetworkingEnabled = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? isOverProvisioningEnabled = default(bool?), System.Collections.Generic.IEnumerable zones = null, bool? isSpotVm = default(bool?), string hostGroupId = null, bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType?), Azure.Core.ResourceIdentifier vmImageResourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Collections.Generic.IEnumerable vmSetupActions = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType? securityEncryptionType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType?), bool? isSecureBootEnabled = default(bool?), bool? isNodePublicIPEnabled = default(bool?), bool? isNodePublicIPv6Enabled = default(bool?), Azure.Core.ResourceIdentifier vmSharedGalleryImageId = null, Azure.Core.ResourceIdentifier natGatewayId = null, System.Collections.Generic.IEnumerable natConfigurations = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.Core.ResourceIdentifier dscpConfigurationId = null, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, System.Collections.Generic.IEnumerable vmApplications = null, bool? isZoneBalanceEnabled = default(bool?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedServiceData ServiceFabricManagedServiceData(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.ServiceFabricManagedClusters.Models.ManagedServiceProperties properties = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string vmSize = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, System.Collections.Generic.IEnumerable correlationScheme = null, System.Collections.Generic.IEnumerable serviceLoadMetrics = null, System.Collections.Generic.IEnumerable servicePlacementPolicies = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost? defaultMoveCost = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost?), System.Collections.Generic.IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme partitionDescription = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? servicePackageActivationMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode?), string serviceDnsName = null, bool? hasPersistedState = default(bool?), int? targetReplicaSetSize = default(int?), int? minReplicaSetSize = default(int?), System.TimeSpan? replicaRestartWaitDuration = default(System.TimeSpan?), System.TimeSpan? quorumLossWaitDuration = default(System.TimeSpan?), System.TimeSpan? standByReplicaKeepDuration = default(System.TimeSpan?), System.TimeSpan? servicePlacementTimeLimit = default(System.TimeSpan?)) { throw null; } @@ -697,6 +726,91 @@ 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 FaultSimulation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaultSimulation() { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails Details { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string SimulationId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation 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 FaultSimulationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected FaultSimulationContent() { } + public System.DateTimeOffset? ConstraintsExpireOn { get { throw null; } set { } } + public bool? IsForced { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent 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 FaultSimulationContentWrapper : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FaultSimulationContentWrapper(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent parameters) { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper 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 FaultSimulationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaultSimulationDetails() { } + public string ClusterId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NodeTypeFaultSimulation { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails 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 FaultSimulationIdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FaultSimulationIdContent(string simulationId) { } + public string SimulationId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent 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 FaultSimulationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaultSimulationStatus(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Active { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Done { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus StartFailed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Starting { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus StopFailed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus 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.ServiceFabricManagedClusters.Models.FaultSimulationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class ManagedAzResiliencyStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ManagedAzResiliencyStatus() { } @@ -1229,6 +1343,20 @@ 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 NodeTypeFaultSimulation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NodeTypeFaultSimulation() { } + public string NodeTypeName { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus? OperationStatus { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation 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 NodeTypeFrontendConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NodeTypeFrontendConfiguration() { } @@ -1274,6 +1402,24 @@ 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 NodeTypeSecurityEncryptionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NodeTypeSecurityEncryptionType(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType DiskWithVmGuestState { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType VmGuestStateOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType 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.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSecurityEncryptionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class NodeTypeSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NodeTypeSku(int capacity) { } @@ -1615,6 +1761,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ServiceFabricManagedClusterSecurityType(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType ConfidentialVm { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType Standard { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType TrustedLaunch { get { throw null; } } public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType other) { throw null; } @@ -1716,6 +1863,9 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write private readonly int _dummyPrimitive; public ServiceFabricManagedDataDiskType(string value) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumLrs { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumV2LRS { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumZrs { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumZRS { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType StandardLrs { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType StandardSsdLrs { get { throw null; } } public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType other) { throw null; } @@ -1974,6 +2124,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; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SfmcOperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SfmcOperationStatus(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Aborted { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Created { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Started { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus 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.ServiceFabricManagedClusters.Models.SfmcOperationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class SingletonPartitionScheme : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SingletonPartitionScheme() { } @@ -2112,4 +2284,15 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode right) { throw null; } public override string ToString() { throw null; } } + public partial class ZoneFaultSimulationContent : Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ZoneFaultSimulationContent() { } + 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.ServiceFabricManagedClusters.Models.ZoneFaultSimulationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZoneFaultSimulationContent 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; } + } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json index 2ba2d3c5d25c..df78396f0e1a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters", - "Tag": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters_1a660306c4" + "Tag": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters_95465ae123" } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Azure.ResourceManager.ServiceFabricManagedClusters.csproj b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Azure.ResourceManager.ServiceFabricManagedClusters.csproj index a19dcd243831..a06abe454d7e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Azure.ResourceManager.ServiceFabricManagedClusters.csproj +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Azure.ResourceManager.ServiceFabricManagedClusters.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.3 + 1.3.0-beta.4 1.2.0 Azure.ResourceManager.ServiceFabricManagedClusters diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownPartition.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownPartition.cs new file mode 100644 index 000000000000..da35805ae4a3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownPartition.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [CodeGenModel("UnknownManagedServicePartitionScheme")] + internal partial class UnknownPartition + { + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingMechanism.cs new file mode 100644 index 000000000000..4e5d958928df --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingMechanism.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [CodeGenModel("UnknownManagedServiceScalingMechanism")] + internal partial class UnknownScalingMechanism + { + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingTrigger.cs new file mode 100644 index 000000000000..0a87b4cfe62e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingTrigger.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [CodeGenModel("UnknownManagedServiceScalingTrigger")] + internal partial class UnknownScalingTrigger + { + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownServicePlacementPolicy.cs new file mode 100644 index 000000000000..18b3a6147cae --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownServicePlacementPolicy.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [CodeGenModel("UnknownManagedServicePlacementPolicy")] + internal partial class UnknownServicePlacementPolicy + { + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/ServiceFabricManagedApplicationData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/ServiceFabricManagedApplicationData.cs new file mode 100644 index 000000000000..a37c541f1978 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/ServiceFabricManagedApplicationData.cs @@ -0,0 +1,60 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Model factory for models. + public static partial class ArmServiceFabricManagedClustersModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Describes the managed identities for an Azure resource. + /// The current deployment or provisioning state, which only appears in the response. + /// + /// The version of the application type as defined in the application manifest. + /// This name must be the full Arm Resource ID for the referenced application type version. + /// + /// List of application parameters with overridden values from their default values specified in the application manifest. + /// Describes the policy for a monitored application upgrade. + /// List of user assigned identities for the application, each mapped to a friendly name. + /// A new instance for mocking. + public static ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, IDictionary parameters = null, ApplicationUpgradePolicy upgradePolicy = null, IEnumerable managedIdentities = null) + { + tags ??= new Dictionary(); + managedIdentities ??= new List(); + parameters ??= new Dictionary(); + + return new ServiceFabricManagedApplicationData( + id, + name, + resourceType, + systemData, + tags, + location, + managedIdentities?.ToList(), + provisioningState, + version, + parameters, + upgradePolicy, + identity, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs index 7e369b07153d..c2670a00e578 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs @@ -18,31 +18,46 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// Model factory for models. public static partial class ArmServiceFabricManagedClustersModelFactory { - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. + /// List of user assigned identities for the application, each mapped to a friendly name. /// The current deployment or provisioning state, which only appears in the response. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null) + /// + /// The version of the application type as defined in the application manifest. + /// This name must be the full Arm Resource ID for the referenced application type version. + /// + /// List of application parameters with overridden values from their default values specified in the application manifest. + /// Describes the policy for a monitored application upgrade. + /// Describes the managed identities for an Azure resource. + /// A new instance for mocking. + public static ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable managedIdentities = null, string provisioningState = null, string version = null, IDictionary parameters = null, ApplicationUpgradePolicy upgradePolicy = null, ManagedServiceIdentity identity = null) { tags ??= new Dictionary(); + managedIdentities ??= new List(); + parameters ??= new Dictionary(); - return new ServiceFabricManagedApplicationTypeData( + return new ServiceFabricManagedApplicationData( id, name, resourceType, systemData, tags, location, + managedIdentities?.ToList(), provisioningState, + version, + parameters, + upgradePolicy, + identity, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -50,13 +65,12 @@ public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplic /// The tags. /// The location. /// The current deployment or provisioning state, which only appears in the response. - /// The URL to the application package. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, Uri appPackageUri = null) + /// A new instance for mocking. + public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null) { tags ??= new Dictionary(); - return new ServiceFabricManagedApplicationTypeVersionData( + return new ServiceFabricManagedApplicationTypeData( id, name, resourceType, @@ -64,47 +78,32 @@ public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManage tags, location, provisioningState, - appPackageUri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Describes the managed identities for an Azure resource. /// The current deployment or provisioning state, which only appears in the response. - /// - /// The version of the application type as defined in the application manifest. - /// This name must be the full Arm Resource ID for the referenced application type version. - /// - /// - /// List of application parameters with overridden values from their default values specified in the application manifest. - /// Describes the policy for a monitored application upgrade. - /// List of user assigned identities for the application, each mapped to a friendly name. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, IDictionary parameters = null, ApplicationUpgradePolicy upgradePolicy = null, IEnumerable managedIdentities = null) + /// The URL to the application package. + /// A new instance for mocking. + public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, Uri appPackageUri = null) { tags ??= new Dictionary(); - parameters ??= new Dictionary(); - managedIdentities ??= new List(); - return new ServiceFabricManagedApplicationData( + return new ServiceFabricManagedApplicationTypeVersionData( id, name, resourceType, systemData, tags, location, - identity, provisioningState, - version, - parameters, - upgradePolicy, - managedIdentities?.ToList(), + appPackageUri, serializedAdditionalRawData: null); } @@ -160,7 +159,6 @@ public static ServiceFabricManagedServiceData ServiceFabricManagedServiceData(Re /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// A new instance for mocking. public static ManagedServiceProperties ManagedServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceKind = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null) @@ -186,6 +184,162 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement serviceDnsName); } + /// Initializes a new instance of . + /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + /// A list that describes the correlation of the service with other services. + /// The service load metrics is given as an array of ServiceLoadMetric objects. + /// + /// A list that describes the correlation of the service with other services. + /// 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 . + /// + /// Specifies the move cost for the service. + /// Scaling policies for this service. + /// The current deployment or provisioning state, which only appears in the response. + /// The name of the service type. + /// + /// Describes how the service is partitioned. + /// 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 activation Mode of the service package. + /// + /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). + /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. + /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. + /// + /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. + /// The target replica set size as a number. + /// The minimum replica set size as a number. + /// The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". + /// The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". + /// The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". + /// The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". + /// A new instance for mocking. + public static StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, bool? hasPersistedState = null, int? targetReplicaSetSize = null, int? minReplicaSetSize = null, TimeSpan? replicaRestartWaitDuration = null, TimeSpan? quorumLossWaitDuration = null, TimeSpan? standByReplicaKeepDuration = null, TimeSpan? servicePlacementTimeLimit = null) + { + correlationScheme ??= new List(); + serviceLoadMetrics ??= new List(); + servicePlacementPolicies ??= new List(); + scalingPolicies ??= new List(); + + return new StatefulServiceProperties( + placementConstraints, + correlationScheme?.ToList(), + serviceLoadMetrics?.ToList(), + servicePlacementPolicies?.ToList(), + defaultMoveCost, + scalingPolicies?.ToList(), + serializedAdditionalRawData: null, + provisioningState, + ServiceKind.Stateful, + serviceTypeName, + partitionDescription, + servicePackageActivationMode, + serviceDnsName, + hasPersistedState, + targetReplicaSetSize, + minReplicaSetSize, + replicaRestartWaitDuration, + quorumLossWaitDuration, + standByReplicaKeepDuration, + servicePlacementTimeLimit); + } + + /// Initializes a new instance of . + /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + /// A list that describes the correlation of the service with other services. + /// The service load metrics is given as an array of ServiceLoadMetric objects. + /// + /// A list that describes the correlation of the service with other services. + /// 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 . + /// + /// Specifies the move cost for the service. + /// Scaling policies for this service. + /// The current deployment or provisioning state, which only appears in the response. + /// The name of the service type. + /// + /// Describes how the service is partitioned. + /// 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 activation Mode of the service package. + /// + /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). + /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. + /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. + /// + /// The instance count. + /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + /// MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + /// A new instance for mocking. + public static StatelessServiceProperties StatelessServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, int instanceCount = default, int? minInstanceCount = null, int? minInstancePercentage = null) + { + correlationScheme ??= new List(); + serviceLoadMetrics ??= new List(); + servicePlacementPolicies ??= new List(); + scalingPolicies ??= new List(); + + return new StatelessServiceProperties( + placementConstraints, + correlationScheme?.ToList(), + serviceLoadMetrics?.ToList(), + servicePlacementPolicies?.ToList(), + defaultMoveCost, + scalingPolicies?.ToList(), + serializedAdditionalRawData: null, + provisioningState, + ServiceKind.Stateless, + serviceTypeName, + partitionDescription, + servicePackageActivationMode, + serviceDnsName, + instanceCount, + minInstanceCount, + minInstancePercentage); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Service Fabric runtime version of the cluster. + /// The date of expiry of support of the version. + /// Cluster operating system, the default will be Windows. + /// A new instance for mocking. + public static ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string clusterCodeVersion = null, DateTimeOffset? versionSupportExpireOn = null, ServiceFabricManagedClusterOSType? osType = null) + { + return new ServiceFabricManagedClusterVersion( + id, + name, + resourceType, + systemData, + clusterCodeVersion, + versionSupportExpireOn, + osType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// VM Size properties. + /// A new instance for mocking. + public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vmSize = null) + { + return new ServiceFabricManagedUnsupportedVmSize( + id, + name, + resourceType, + systemData, + vmSize != null ? new VmSize(vmSize, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -193,7 +347,6 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// The systemData. /// The tags. /// The location. - /// The sku of the managed cluster. /// The cluster dns name. /// The fully qualified domain name associated with the public load balancer of the cluster. /// The IPv4 address associated with the public load balancer of the cluster. @@ -212,10 +365,7 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// The list of custom fabric settings to configure the cluster. /// The provisioning state of the managed cluster resource. /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. /// List of add-on features to enable on the cluster. /// Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. @@ -238,9 +388,11 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. /// This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. - /// Azure resource etag. + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + /// 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 sku of the managed cluster. /// A new instance for mocking. - public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ServiceFabricManagedClustersSkuName? skuName = null, string dnsName = null, string fqdn = null, IPAddress ipv4Address = null, Guid? clusterId = null, ServiceFabricManagedClusterState? clusterState = null, IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = null, int? httpGatewayConnectionPort = null, string adminUserName = null, string adminPassword = null, IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = null, IEnumerable networkSecurityRules = null, IEnumerable clients = null, ManagedClusterAzureActiveDirectory azureActiveDirectory = null, IEnumerable fabricSettings = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, string clusterCodeVersion = null, ManagedClusterUpgradeMode? clusterUpgradeMode = null, ManagedClusterUpgradeCadence? clusterUpgradeCadence = null, IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = null, bool? hasZoneResiliency = null, int? maxUnusedVersionsToKeep = null, bool? isIPv6Enabled = null, string subnetId = null, IEnumerable ipTags = null, IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = null, IEnumerable auxiliarySubnets = null, IEnumerable serviceEndpoints = null, ZonalUpdateMode? zonalUpdateMode = null, bool? useCustomVnet = null, ResourceIdentifier publicIPPrefixId = null, ResourceIdentifier publicIPv6PrefixId = null, ResourceIdentifier ddosProtectionPlanId = null, ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = null, bool? isHttpGatewayExclusiveAuthModeEnabled = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, int? allocatedOutboundPorts = null, ETag? etag = null) + public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string dnsName = null, string fqdn = null, IPAddress ipv4Address = null, Guid? clusterId = null, ServiceFabricManagedClusterState? clusterState = null, IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = null, int? httpGatewayConnectionPort = null, string adminUserName = null, string adminPassword = null, IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = null, IEnumerable networkSecurityRules = null, IEnumerable clients = null, ManagedClusterAzureActiveDirectory azureActiveDirectory = null, IEnumerable fabricSettings = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, string clusterCodeVersion = null, ManagedClusterUpgradeMode? clusterUpgradeMode = null, ManagedClusterUpgradeCadence? clusterUpgradeCadence = null, IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = null, bool? hasZoneResiliency = null, int? maxUnusedVersionsToKeep = null, bool? isIPv6Enabled = null, string subnetId = null, IEnumerable ipTags = null, IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = null, IEnumerable auxiliarySubnets = null, IEnumerable serviceEndpoints = null, ZonalUpdateMode? zonalUpdateMode = null, bool? useCustomVnet = null, ResourceIdentifier publicIPPrefixId = null, ResourceIdentifier publicIPv6PrefixId = null, ResourceIdentifier ddosProtectionPlanId = null, ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = null, bool? isHttpGatewayExclusiveAuthModeEnabled = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, int? allocatedOutboundPorts = null, string vmImage = null, ETag? etag = null, ServiceFabricManagedClustersSkuName? skuName = null) { tags ??= new Dictionary(); clusterCertificateThumbprints ??= new List(); @@ -260,7 +412,6 @@ public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Re systemData, tags, location, - skuName.HasValue ? new ServiceFabricManagedClustersSku(skuName.Value, serializedAdditionalRawData: null) : null, dnsName, fqdn, ipv4Address, @@ -302,10 +453,58 @@ public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Re isHttpGatewayExclusiveAuthModeEnabled, autoGeneratedDomainNameLabelScope, allocatedOutboundPorts, + vmImage, etag, + skuName.HasValue ? new ServiceFabricManagedClustersSku(skuName.Value, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Fault simulation status. + /// The start time of the fault simulation. + /// The end time of the fault simulation. + /// Fault simulation details. + /// A new instance for mocking. + public static FaultSimulation FaultSimulation(string simulationId = null, FaultSimulationStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, FaultSimulationDetails details = null) + { + return new FaultSimulation( + simulationId, + status, + startOn, + endOn, + details, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// unique identifier for the cluster resource. + /// unique identifier for the operation associated with the fault simulation. + /// List of node type simulations associated with the cluster fault simulation. + /// + /// Fault simulation parameters. + /// 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 . + /// + /// A new instance for mocking. + public static FaultSimulationDetails FaultSimulationDetails(string clusterId = null, string operationId = null, IEnumerable nodeTypeFaultSimulation = null, FaultSimulationContent parameters = null) + { + nodeTypeFaultSimulation ??= new List(); + + return new FaultSimulationDetails(clusterId, operationId, nodeTypeFaultSimulation?.ToList(), parameters, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Node type name. + /// Fault simulation status. + /// Current or latest asynchronous operation identifier on the node type. + /// Current or latest asynchronous operation status on the node type. + /// A new instance for mocking. + public static NodeTypeFaultSimulation NodeTypeFaultSimulation(string nodeTypeName = null, FaultSimulationStatus? status = null, string operationId = null, SfmcOperationStatus? operationStatus = null) + { + return new NodeTypeFaultSimulation(nodeTypeName, status, operationId, operationStatus, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// List of Managed VM Sizes for Service Fabric Managed Clusters. /// URL to get the next set of Managed VM Sizes if there are any. @@ -350,54 +549,13 @@ public static ManagedMaintenanceWindowStatus ManagedMaintenanceWindowStatus(bool serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The Service Fabric runtime version of the cluster. - /// The date of expiry of support of the version. - /// Cluster operating system, the default will be Windows. - /// A new instance for mocking. - public static ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string clusterCodeVersion = null, DateTimeOffset? versionSupportExpireOn = null, ServiceFabricManagedClusterOSType? osType = null) - { - return new ServiceFabricManagedClusterVersion( - id, - name, - resourceType, - systemData, - clusterCodeVersion, - versionSupportExpireOn, - osType, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// VM Size properties. - /// A new instance for mocking. - public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vmSize = null) - { - return new ServiceFabricManagedUnsupportedVmSize( - id, - name, - resourceType, - systemData, - vmSize != null ? new VmSize(vmSize, serializedAdditionalRawData: null) : null, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The node type sku. /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. /// Disk size for the managed disk attached to the vms on the node type in GBs. /// Managed data disk type. Specifies the storage account type for the managed disk. /// Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. @@ -433,8 +591,9 @@ public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsuppor /// Indicates the resource id of the vm image. This parameter is used for custom vm image. /// Indicates the resource id of the subnet for the node type. /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. /// Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. /// Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. @@ -446,9 +605,11 @@ public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsuppor /// Specifies the settings for any additional secondary network interfaces to attach to the node type. /// Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. /// Specifies the gallery applications that should be made available to the underlying VMSS. - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + /// Resource tags. + /// The node type sku. /// A new instance for mocking. - public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NodeTypeSku sku = null, bool? isPrimary = null, int? vmInstanceCount = null, int? dataDiskSizeInGB = null, ServiceFabricManagedDataDiskType? dataDiskType = null, string dataDiskLetter = null, IDictionary placementProperties = null, IDictionary capacities = null, EndpointRangeDescription applicationPorts = null, EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, IEnumerable vmSecrets = null, IEnumerable vmExtensions = null, IEnumerable userAssignedIdentities = null, bool? isStateless = null, bool? hasMultiplePlacementGroups = null, IEnumerable frontendConfigurations = null, IEnumerable networkSecurityRules = null, IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, bool? isAcceleratedNetworkingEnabled = null, bool? useDefaultPublicLoadBalancer = null, bool? useTempDataDisk = null, bool? isOverProvisioningEnabled = null, IEnumerable zones = null, bool? isSpotVm = null, string hostGroupId = null, bool? useEphemeralOSDisk = null, string spotRestoreTimeout = null, SpotNodeVmEvictionPolicyType? evictionPolicy = null, ResourceIdentifier vmImageResourceId = null, ResourceIdentifier subnetId = null, IEnumerable vmSetupActions = null, ServiceFabricManagedClusterSecurityType? securityType = null, bool? isSecureBootEnabled = null, bool? isNodePublicIPEnabled = null, bool? isNodePublicIPv6Enabled = null, ResourceIdentifier vmSharedGalleryImageId = null, ResourceIdentifier natGatewayId = null, IEnumerable natConfigurations = null, VmImagePlan vmImagePlan = null, ResourceIdentifier serviceArtifactReferenceId = null, ResourceIdentifier dscpConfigurationId = null, IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, IEnumerable vmApplications = null, IDictionary tags = null) + public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isPrimary = null, int? vmInstanceCount = null, int? dataDiskSizeInGB = null, ServiceFabricManagedDataDiskType? dataDiskType = null, string dataDiskLetter = null, IDictionary placementProperties = null, IDictionary capacities = null, EndpointRangeDescription applicationPorts = null, EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, IEnumerable vmSecrets = null, IEnumerable vmExtensions = null, IEnumerable userAssignedIdentities = null, bool? isStateless = null, bool? hasMultiplePlacementGroups = null, IEnumerable frontendConfigurations = null, IEnumerable networkSecurityRules = null, IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, bool? isAcceleratedNetworkingEnabled = null, bool? useDefaultPublicLoadBalancer = null, bool? useTempDataDisk = null, bool? isOverProvisioningEnabled = null, IEnumerable zones = null, bool? isSpotVm = null, string hostGroupId = null, bool? useEphemeralOSDisk = null, string spotRestoreTimeout = null, SpotNodeVmEvictionPolicyType? evictionPolicy = null, ResourceIdentifier vmImageResourceId = null, ResourceIdentifier subnetId = null, IEnumerable vmSetupActions = null, ServiceFabricManagedClusterSecurityType? securityType = null, NodeTypeSecurityEncryptionType? securityEncryptionType = null, bool? isSecureBootEnabled = null, bool? isNodePublicIPEnabled = null, bool? isNodePublicIPv6Enabled = null, ResourceIdentifier vmSharedGalleryImageId = null, ResourceIdentifier natGatewayId = null, IEnumerable natConfigurations = null, VmImagePlan vmImagePlan = null, ResourceIdentifier serviceArtifactReferenceId = null, ResourceIdentifier dscpConfigurationId = null, IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, IEnumerable vmApplications = null, bool? isZoneBalanceEnabled = null, IDictionary tags = null, NodeTypeSku sku = null) { placementProperties ??= new Dictionary(); capacities ??= new Dictionary(); @@ -470,7 +631,6 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( name, resourceType, systemData, - sku, isPrimary, vmInstanceCount, dataDiskSizeInGB, @@ -509,6 +669,7 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( subnetId, vmSetupActions?.ToList(), securityType, + securityEncryptionType, isSecureBootEnabled, isNodePublicIPEnabled, isNodePublicIPv6Enabled, @@ -521,7 +682,9 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( additionalNetworkInterfaceConfigurations?.ToList(), computerNamePrefix, vmApplications?.ToList(), + isZoneBalanceEnabled, tags, + sku, serializedAdditionalRawData: null); } @@ -561,7 +724,7 @@ public static NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, st } /// Initializes a new instance of . - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. /// The supported SKU for a for node type. /// Provides information about how the node count can be scaled. /// A new instance for mocking. @@ -572,7 +735,7 @@ public static NodeTypeAvailableSku NodeTypeAvailableSku(ResourceType? resourceTy /// Initializes a new instance of . /// The sku name. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. /// A new instance for mocking. public static NodeTypeSupportedSku NodeTypeSupportedSku(string name = null, string tier = null) { @@ -590,124 +753,6 @@ public static NodeTypeSkuCapacity NodeTypeSkuCapacity(int? minimum = null, int? return new NodeTypeSkuCapacity(minimum, maximum, @default, scaleType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". - /// A list that describes the correlation of the service with other services. - /// The service load metrics is given as an array of ServiceLoadMetric objects. - /// - /// A list that describes the correlation of the service with other services. - /// 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 . - /// - /// Specifies the move cost for the service. - /// Scaling policies for this service. - /// The current deployment or provisioning state, which only appears in the response. - /// The name of the service type. - /// - /// Describes how the service is partitioned. - /// 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 activation Mode of the service package. - /// - /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). - /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. - /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// - /// - /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. - /// The target replica set size as a number. - /// The minimum replica set size as a number. - /// The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". - /// The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". - /// The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". - /// The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". - /// A new instance for mocking. - public static StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, bool? hasPersistedState = null, int? targetReplicaSetSize = null, int? minReplicaSetSize = null, TimeSpan? replicaRestartWaitDuration = null, TimeSpan? quorumLossWaitDuration = null, TimeSpan? standByReplicaKeepDuration = null, TimeSpan? servicePlacementTimeLimit = null) - { - correlationScheme ??= new List(); - serviceLoadMetrics ??= new List(); - servicePlacementPolicies ??= new List(); - scalingPolicies ??= new List(); - - return new StatefulServiceProperties( - placementConstraints, - correlationScheme?.ToList(), - serviceLoadMetrics?.ToList(), - servicePlacementPolicies?.ToList(), - defaultMoveCost, - scalingPolicies?.ToList(), - serializedAdditionalRawData: null, - provisioningState, - ServiceKind.Stateful, - serviceTypeName, - partitionDescription, - servicePackageActivationMode, - serviceDnsName, - hasPersistedState, - targetReplicaSetSize, - minReplicaSetSize, - replicaRestartWaitDuration, - quorumLossWaitDuration, - standByReplicaKeepDuration, - servicePlacementTimeLimit); - } - - /// Initializes a new instance of . - /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". - /// A list that describes the correlation of the service with other services. - /// The service load metrics is given as an array of ServiceLoadMetric objects. - /// - /// A list that describes the correlation of the service with other services. - /// 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 . - /// - /// Specifies the move cost for the service. - /// Scaling policies for this service. - /// The current deployment or provisioning state, which only appears in the response. - /// The name of the service type. - /// - /// Describes how the service is partitioned. - /// 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 activation Mode of the service package. - /// - /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). - /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. - /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// - /// - /// The instance count. - /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. - /// MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. - /// A new instance for mocking. - public static StatelessServiceProperties StatelessServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, int instanceCount = default, int? minInstanceCount = null, int? minInstancePercentage = null) - { - correlationScheme ??= new List(); - serviceLoadMetrics ??= new List(); - servicePlacementPolicies ??= new List(); - scalingPolicies ??= new List(); - - return new StatelessServiceProperties( - placementConstraints, - correlationScheme?.ToList(), - serviceLoadMetrics?.ToList(), - servicePlacementPolicies?.ToList(), - defaultMoveCost, - scalingPolicies?.ToList(), - serializedAdditionalRawData: null, - provisioningState, - ServiceKind.Stateless, - serviceTypeName, - partitionDescription, - servicePackageActivationMode, - serviceDnsName, - instanceCount, - minInstanceCount, - minInstancePercentage); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -762,7 +807,7 @@ public static StatelessServiceProperties StatelessServiceProperties(string place [EditorBrowsable(EditorBrowsableState.Never)] public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ServiceFabricManagedClustersSkuName? skuName, string dnsName, string fqdn, IPAddress ipv4Address, Guid? clusterId, ServiceFabricManagedClusterState? clusterState, IEnumerable clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IEnumerable loadBalancingRules, bool? isRdpAccessAllowed, IEnumerable networkSecurityRules, IEnumerable clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IEnumerable fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IEnumerable addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, int? maxUnusedVersionsToKeep, bool? isIPv6Enabled, string subnetId, IEnumerable ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IEnumerable auxiliarySubnets, IEnumerable serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, ETag? etag) { - return ServiceFabricManagedClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, skuName: skuName, dnsName: dnsName, fqdn: fqdn, ipv4Address: ipv4Address, clusterId: clusterId, clusterState: clusterState, clusterCertificateThumbprints: clusterCertificateThumbprints, clientConnectionPort: clientConnectionPort, httpGatewayConnectionPort: httpGatewayConnectionPort, adminUserName: adminUserName, adminPassword: adminPassword, loadBalancingRules: loadBalancingRules, isRdpAccessAllowed: isRdpAccessAllowed, networkSecurityRules: networkSecurityRules, clients: clients, azureActiveDirectory: azureActiveDirectory, fabricSettings: fabricSettings, provisioningState: provisioningState, clusterCodeVersion: clusterCodeVersion, clusterUpgradeMode: clusterUpgradeMode, clusterUpgradeCadence: clusterUpgradeCadence, addOnFeatures: addOnFeatures, isAutoOSUpgradeEnabled: isAutoOSUpgradeEnabled, hasZoneResiliency: hasZoneResiliency, maxUnusedVersionsToKeep: maxUnusedVersionsToKeep, isIPv6Enabled: isIPv6Enabled, subnetId: subnetId, ipTags: ipTags, ipv6Address: ipv6Address, isServicePublicIPEnabled: isServicePublicIPEnabled, auxiliarySubnets: auxiliarySubnets, serviceEndpoints: serviceEndpoints, zonalUpdateMode: zonalUpdateMode, useCustomVnet: useCustomVnet, publicIPPrefixId: publicIPPrefixId, publicIPv6PrefixId: publicIPv6PrefixId, ddosProtectionPlanId: ddosProtectionPlanId, upgradeDescription: upgradeDescription, httpGatewayTokenAuthConnectionPort: httpGatewayTokenAuthConnectionPort, isHttpGatewayExclusiveAuthModeEnabled: isHttpGatewayExclusiveAuthModeEnabled, autoGeneratedDomainNameLabelScope: default, allocatedOutboundPorts: default, etag: etag); + return ServiceFabricManagedClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, dnsName: dnsName, fqdn: fqdn, ipv4Address: ipv4Address, clusterId: clusterId, clusterState: clusterState, clusterCertificateThumbprints: clusterCertificateThumbprints, clientConnectionPort: clientConnectionPort, httpGatewayConnectionPort: httpGatewayConnectionPort, adminUserName: adminUserName, adminPassword: adminPassword, loadBalancingRules: loadBalancingRules, isRdpAccessAllowed: isRdpAccessAllowed, networkSecurityRules: networkSecurityRules, clients: clients, azureActiveDirectory: azureActiveDirectory, fabricSettings: fabricSettings, provisioningState: provisioningState, clusterCodeVersion: clusterCodeVersion, clusterUpgradeMode: clusterUpgradeMode, clusterUpgradeCadence: clusterUpgradeCadence, addOnFeatures: addOnFeatures, isAutoOSUpgradeEnabled: isAutoOSUpgradeEnabled, hasZoneResiliency: hasZoneResiliency, maxUnusedVersionsToKeep: maxUnusedVersionsToKeep, isIPv6Enabled: isIPv6Enabled, subnetId: subnetId, ipTags: ipTags, ipv6Address: ipv6Address, isServicePublicIPEnabled: isServicePublicIPEnabled, auxiliarySubnets: auxiliarySubnets, serviceEndpoints: serviceEndpoints, zonalUpdateMode: zonalUpdateMode, useCustomVnet: useCustomVnet, publicIPPrefixId: publicIPPrefixId, publicIPv6PrefixId: publicIPv6PrefixId, ddosProtectionPlanId: ddosProtectionPlanId, upgradeDescription: upgradeDescription, httpGatewayTokenAuthConnectionPort: httpGatewayTokenAuthConnectionPort, isHttpGatewayExclusiveAuthModeEnabled: isHttpGatewayExclusiveAuthModeEnabled, autoGeneratedDomainNameLabelScope: default, allocatedOutboundPorts: default, vmImage: default, etag: etag, skuName: skuName); } /// Initializes a new instance of . @@ -825,7 +870,7 @@ public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Re [EditorBrowsable(EditorBrowsableState.Never)] public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IEnumerable vmSecrets, IEnumerable vmExtensions, IEnumerable userAssignedIdentities, bool? isStateless, bool? hasMultiplePlacementGroups, IEnumerable frontendConfigurations, IEnumerable networkSecurityRules, IEnumerable additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IEnumerable zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IEnumerable vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IEnumerable natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IEnumerable additionalNetworkInterfaceConfigurations, string computerNamePrefix, IDictionary tags) { - return ServiceFabricManagedNodeTypeData(id: id, name: name, resourceType: resourceType, systemData: systemData, sku: sku, isPrimary: isPrimary, vmInstanceCount: vmInstanceCount, dataDiskSizeInGB: dataDiskSizeInGB, dataDiskType: dataDiskType, dataDiskLetter: dataDiskLetter, placementProperties: placementProperties, capacities: capacities, applicationPorts: applicationPorts, ephemeralPorts: ephemeralPorts, vmSize: vmSize, vmImagePublisher: vmImagePublisher, vmImageOffer: vmImageOffer, vmImageSku: vmImageSku, vmImageVersion: vmImageVersion, vmSecrets: vmSecrets, vmExtensions: vmExtensions, userAssignedIdentities: userAssignedIdentities, isStateless: isStateless, hasMultiplePlacementGroups: hasMultiplePlacementGroups, frontendConfigurations: frontendConfigurations, networkSecurityRules: networkSecurityRules, additionalDataDisks: additionalDataDisks, isEncryptionAtHostEnabled: isEncryptionAtHostEnabled, provisioningState: provisioningState, isAcceleratedNetworkingEnabled: isAcceleratedNetworkingEnabled, useDefaultPublicLoadBalancer: useDefaultPublicLoadBalancer, useTempDataDisk: useTempDataDisk, isOverProvisioningEnabled: isOverProvisioningEnabled, zones: zones, isSpotVm: isSpotVm, hostGroupId: hostGroupId, useEphemeralOSDisk: useEphemeralOSDisk, spotRestoreTimeout: spotRestoreTimeout, evictionPolicy: evictionPolicy, vmImageResourceId: vmImageResourceId, subnetId: subnetId, vmSetupActions: vmSetupActions, securityType: securityType, isSecureBootEnabled: isSecureBootEnabled, isNodePublicIPEnabled: isNodePublicIPEnabled, isNodePublicIPv6Enabled: isNodePublicIPv6Enabled, vmSharedGalleryImageId: vmSharedGalleryImageId, natGatewayId: natGatewayId, natConfigurations: natConfigurations, vmImagePlan: vmImagePlan, serviceArtifactReferenceId: serviceArtifactReferenceId, dscpConfigurationId: dscpConfigurationId, additionalNetworkInterfaceConfigurations: additionalNetworkInterfaceConfigurations, computerNamePrefix: computerNamePrefix, vmApplications: default, tags: tags); + return ServiceFabricManagedNodeTypeData(id: id, name: name, resourceType: resourceType, systemData: systemData, isPrimary: isPrimary, vmInstanceCount: vmInstanceCount, dataDiskSizeInGB: dataDiskSizeInGB, dataDiskType: dataDiskType, dataDiskLetter: dataDiskLetter, placementProperties: placementProperties, capacities: capacities, applicationPorts: applicationPorts, ephemeralPorts: ephemeralPorts, vmSize: vmSize, vmImagePublisher: vmImagePublisher, vmImageOffer: vmImageOffer, vmImageSku: vmImageSku, vmImageVersion: vmImageVersion, vmSecrets: vmSecrets, vmExtensions: vmExtensions, userAssignedIdentities: userAssignedIdentities, isStateless: isStateless, hasMultiplePlacementGroups: hasMultiplePlacementGroups, frontendConfigurations: frontendConfigurations, networkSecurityRules: networkSecurityRules, additionalDataDisks: additionalDataDisks, isEncryptionAtHostEnabled: isEncryptionAtHostEnabled, provisioningState: provisioningState, isAcceleratedNetworkingEnabled: isAcceleratedNetworkingEnabled, useDefaultPublicLoadBalancer: useDefaultPublicLoadBalancer, useTempDataDisk: useTempDataDisk, isOverProvisioningEnabled: isOverProvisioningEnabled, zones: zones, isSpotVm: isSpotVm, hostGroupId: hostGroupId, useEphemeralOSDisk: useEphemeralOSDisk, spotRestoreTimeout: spotRestoreTimeout, evictionPolicy: evictionPolicy, vmImageResourceId: vmImageResourceId, subnetId: subnetId, vmSetupActions: vmSetupActions, securityType: securityType, securityEncryptionType: default, isSecureBootEnabled: isSecureBootEnabled, isNodePublicIPEnabled: isNodePublicIPEnabled, isNodePublicIPv6Enabled: isNodePublicIPv6Enabled, vmSharedGalleryImageId: vmSharedGalleryImageId, natGatewayId: natGatewayId, natConfigurations: natConfigurations, vmImagePlan: vmImagePlan, serviceArtifactReferenceId: serviceArtifactReferenceId, dscpConfigurationId: dscpConfigurationId, additionalNetworkInterfaceConfigurations: additionalNetworkInterfaceConfigurations, computerNamePrefix: computerNamePrefix, vmApplications: default, isZoneBalanceEnabled: default, tags: tags, sku: sku); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs index 7d80fd5be0e9..a0e589cecd55 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs @@ -34,6 +34,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// 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 ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(ResourceIdentifier id) + { + ServiceFabricManagedApplicationResource.ValidateResourceId(id); + return new ServiceFabricManagedApplicationResource(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. @@ -58,18 +70,6 @@ public virtual ServiceFabricManagedApplicationTypeVersionResource GetServiceFabr return new ServiceFabricManagedApplicationTypeVersionResource(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 ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(ResourceIdentifier id) - { - ServiceFabricManagedApplicationResource.ValidateResourceId(id); - return new ServiceFabricManagedApplicationResource(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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs index e77ca51e1c64..c1d7741186f2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs @@ -49,11 +49,11 @@ public virtual ServiceFabricManagedClusterCollection GetServiceFabricManagedClus /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -80,11 +80,11 @@ public virtual async Task> GetServ /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs index 4695cc8855df..118c3a594615 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableServiceFabricManagedClustersSubscriptionResource : ArmResource { - private ClientDiagnostics _serviceFabricManagedClusterManagedClustersClientDiagnostics; - private ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; private ClientDiagnostics _managedClusterVersionClientDiagnostics; private ManagedClusterVersionRestOperations _managedClusterVersionRestClient; private ClientDiagnostics _managedUnsupportedVmSizesClientDiagnostics; private ManagedUnsupportedVMSizesRestOperations _managedUnsupportedVmSizesRestClient; + private ClientDiagnostics _serviceFabricManagedClusterManagedClustersClientDiagnostics; + private ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; /// Initializes a new instance of the class for mocking. protected MockableServiceFabricManagedClustersSubscriptionResource() @@ -37,12 +37,12 @@ internal MockableServiceFabricManagedClustersSubscriptionResource(ArmClient clie { } - private ClientDiagnostics ServiceFabricManagedClusterManagedClustersClientDiagnostics => _serviceFabricManagedClusterManagedClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedClusterResource.ResourceType.Namespace, Diagnostics); - private ManagedClustersRestOperations ServiceFabricManagedClusterManagedClustersRestClient => _serviceFabricManagedClusterManagedClustersRestClient ??= new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceFabricManagedClusterResource.ResourceType)); private ClientDiagnostics ManagedClusterVersionClientDiagnostics => _managedClusterVersionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); private ManagedClusterVersionRestOperations ManagedClusterVersionRestClient => _managedClusterVersionRestClient ??= new ManagedClusterVersionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics managedUnsupportedVMSizesClientDiagnostics => _managedUnsupportedVmSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private ManagedUnsupportedVMSizesRestOperations managedUnsupportedVMSizesRestClient => _managedUnsupportedVmSizesRestClient ??= new ManagedUnsupportedVMSizesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ManagedUnsupportedVMSizesClientDiagnostics => _managedUnsupportedVmSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ManagedUnsupportedVMSizesRestOperations ManagedUnsupportedVMSizesRestClient => _managedUnsupportedVmSizesRestClient ??= new ManagedUnsupportedVMSizesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ServiceFabricManagedClusterManagedClustersClientDiagnostics => _serviceFabricManagedClusterManagedClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedClusterResource.ResourceType.Namespace, Diagnostics); + private ManagedClustersRestOperations ServiceFabricManagedClusterManagedClustersRestClient => _serviceFabricManagedClusterManagedClustersRestClient ??= new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceFabricManagedClusterResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -50,66 +50,6 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters - /// - /// - /// Operation Id - /// ManagedClusters_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetServiceFabricManagedClustersAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); - } - - /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters - /// - /// - /// Operation Id - /// ManagedClusters_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetServiceFabricManagedClusters(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); - } - /// /// Gets information about an available Service Fabric managed cluster code version. /// @@ -123,7 +63,7 @@ public virtual Pageable GetServiceFabricMan /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -163,7 +103,7 @@ public virtual async Task> GetManag /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -190,6 +130,58 @@ public virtual Response GetManagedClusterVer } } + /// + /// Gets all available code versions for Service Fabric cluster resources by location. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// + /// + /// Operation Id + /// ManagedClusterVersion_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The location for the cluster code versions. This is different from cluster location. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetManagedClusterVersionsAsync(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + } + + /// + /// Gets all available code versions for Service Fabric cluster resources by location. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// + /// + /// Operation Id + /// ManagedClusterVersion_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The location for the cluster code versions. This is different from cluster location. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetManagedClusterVersions(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + } + /// /// Gets information about an available Service Fabric cluster code version by environment. /// @@ -199,16 +191,16 @@ public virtual Response GetManagedClusterVer /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -221,7 +213,7 @@ public virtual async Task> GetManag scope.Start(); try { - var response = await ManagedClusterVersionRestClient.GetByEnvironmentAsync(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken).ConfigureAwait(false); + var response = await ManagedClusterVersionRestClient.GetManagedClusterVersionByEnvironmentAsync(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -240,16 +232,16 @@ public virtual async Task> GetManag /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -262,7 +254,7 @@ public virtual Response GetManagedClusterVer scope.Start(); try { - var response = ManagedClusterVersionRestClient.GetByEnvironment(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken); + var response = ManagedClusterVersionRestClient.GetManagedClusterVersionByEnvironment(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken); return response; } catch (Exception e) @@ -273,109 +265,137 @@ public virtual Response GetManagedClusterVer } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetManagedClusterVersionsAsync(AzureLocation location, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetManagedClusterVersions(AzureLocation location, CancellationToken cancellationToken = default) + public virtual Pageable GetManagedClusterVersionsByEnvironment(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetManagedUnsupportedVmSizeAsync(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + + using var scope = ManagedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); + scope.Start(); + try + { + var response = await ManagedUnsupportedVMSizesRestClient.GetManagedUnsupportedVmSizeAsync(Id.SubscriptionId, location, vmSize, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetManagedClusterVersionsByEnvironment(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetManagedUnsupportedVmSize(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + + using var scope = ManagedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); + scope.Start(); + try + { + var response = ManagedUnsupportedVMSizesRestClient.GetManagedUnsupportedVmSize(Id.SubscriptionId, location, vmSize, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// @@ -387,11 +407,11 @@ public virtual Pageable GetManagedClusterVer /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -400,9 +420,9 @@ public virtual Pageable GetManagedClusterVer /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetManagedUnsupportedVmSizesAsync(AzureLocation location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => managedUnsupportedVMSizesRestClient.CreateListRequest(Id.SubscriptionId, location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => managedUnsupportedVMSizesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), managedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), ManagedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); } /// @@ -414,11 +434,11 @@ public virtual AsyncPageable GetManagedUn /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -427,89 +447,69 @@ public virtual AsyncPageable GetManagedUn /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetManagedUnsupportedVmSizes(AzureLocation location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => managedUnsupportedVMSizesRestClient.CreateListRequest(Id.SubscriptionId, location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => managedUnsupportedVMSizesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), managedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), ManagedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetManagedUnsupportedVmSizeAsync(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetServiceFabricManagedClustersAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - - using var scope = managedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); - scope.Start(); - try - { - var response = await managedUnsupportedVMSizesRestClient.GetAsync(Id.SubscriptionId, location, vmSize, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetManagedUnsupportedVmSize(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetServiceFabricManagedClusters(CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - - using var scope = managedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); - scope.Start(); - try - { - var response = managedUnsupportedVMSizesRestClient.Get(Id.SubscriptionId, location, vmSize, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs index b1d39a7ef13d..9a4311fc0026 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs @@ -34,60 +34,60 @@ private static MockableServiceFabricManagedClustersSubscriptionResource GetMocka } /// - /// 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 ServiceFabricManagedApplicationTypeResource GetServiceFabricManagedApplicationTypeResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationResource(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 ServiceFabricManagedApplicationTypeVersionResource GetServiceFabricManagedApplicationTypeVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationTypeResource GetServiceFabricManagedApplicationTypeResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeVersionResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeResource(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 ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationTypeVersionResource GetServiceFabricManagedApplicationTypeVersionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeVersionResource(id); } /// @@ -173,11 +173,11 @@ public static ServiceFabricManagedClusterCollection GetServiceFabricManagedClust /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -211,11 +211,11 @@ public static async Task> GetServi /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -241,143 +241,137 @@ public static Response GetServiceFabricMana } /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// Gets information about an available Service Fabric managed cluster code version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusters_ListBySubscription + /// ManagedClusterVersion_Get /// /// /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The location for the cluster code versions. This is different from cluster location. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetServiceFabricManagedClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task> GetManagedClusterVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClustersAsync(cancellationToken); + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionAsync(location, clusterVersion, cancellationToken).ConfigureAwait(false); } /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// Gets information about an available Service Fabric managed cluster code version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusters_ListBySubscription + /// ManagedClusterVersion_Get /// /// /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The location for the cluster code versions. This is different from cluster location. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetServiceFabricManagedClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response GetManagedClusterVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClusters(cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersion(location, clusterVersion, cancellationToken); } /// - /// Gets information about an available Service Fabric managed cluster code version. + /// Gets all available code versions for Service Fabric cluster resources by location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_Get + /// ManagedClusterVersion_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static async Task> GetManagedClusterVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetManagedClusterVersionsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionAsync(location, clusterVersion, cancellationToken).ConfigureAwait(false); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsAsync(location, cancellationToken); } /// - /// Gets information about an available Service Fabric managed cluster code version. + /// Gets all available code versions for Service Fabric cluster resources by location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_Get + /// ManagedClusterVersion_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static Response GetManagedClusterVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetManagedClusterVersions(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersion(location, clusterVersion, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersions(location, cancellationToken); } /// @@ -389,11 +383,11 @@ public static Response GetManagedClusterVers /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -403,7 +397,7 @@ public static Response GetManagedClusterVers /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -424,11 +418,11 @@ public static async Task> GetManage /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -438,7 +432,7 @@ public static async Task> GetManage /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -451,137 +445,139 @@ public static Response GetManagedClusterVers } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetManagedClusterVersionsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsAsync(location, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironmentAsync(location, environment, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetManagedClusterVersions(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static Pageable GetManagedClusterVersionsByEnvironment(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersions(location, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironment(location, environment, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task> GetManagedUnsupportedVmSizeAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironmentAsync(location, environment, cancellationToken); + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSizeAsync(location, vmSize, cancellationToken).ConfigureAwait(false); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetManagedClusterVersionsByEnvironment(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response GetManagedUnsupportedVmSize(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironment(location, environment, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSize(location, vmSize, cancellationToken); } /// @@ -593,11 +589,11 @@ public static Pageable GetManagedClusterVers /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -626,11 +622,11 @@ public static AsyncPageable GetManagedUns /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -651,71 +647,75 @@ public static Pageable GetManagedUnsuppor } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static async Task> GetManagedUnsupportedVmSizeAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetServiceFabricManagedClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSizeAsync(location, vmSize, cancellationToken).ConfigureAwait(false); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClustersAsync(cancellationToken); } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static Response GetManagedUnsupportedVmSize(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetServiceFabricManagedClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSize(location, vmSize, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClusters(cancellationToken); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs new file mode 100644 index 000000000000..e9a9751cd1f7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.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.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal class FaultSimulationOperationSource : IOperationSource + { + FaultSimulation IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return FaultSimulation.DeserializeFaultSimulation(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return FaultSimulation.DeserializeFaultSimulation(document.RootElement); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs index 0b0ba5080f67..88e8a494d8e7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. public partial class ApplicationHealthPolicy { /// @@ -55,7 +52,6 @@ public partial class ApplicationHealthPolicy /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// public ApplicationHealthPolicy(bool considerWarningAsError, int maxPercentUnhealthyDeployedApplications) { @@ -71,7 +67,6 @@ public ApplicationHealthPolicy(bool considerWarningAsError, int maxPercentUnheal /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// /// The health policy used by default to evaluate the health of a service type. /// The map with service type health policy per service type name. The map is empty by default. @@ -97,7 +92,6 @@ internal ApplicationHealthPolicy() /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// public int MaxPercentUnhealthyDeployedApplications { get; set; } /// The health policy used by default to evaluate the health of a service type. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs index 655f55ee7893..1b0653d34a35 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationResourceList)} does not support writing '{format}' format."); } - if (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 ApplicationResourceList DeserializeApplicationResourceList(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 ApplicationResourceList DeserializeApplicationResourceList(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 ApplicationResourceList DeserializeApplicationResourceList(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs index c2006414888b..d6bf1805149c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationResourceList() + /// The ApplicationResource items on this page. + /// is null. + internal ApplicationResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application list results if there are any. + /// The ApplicationResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationResourceList() + { + } + + /// The ApplicationResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs index 861f1e47e934..b2c297d7cdde 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationTypeResourceList)} does not support writing '{format}' format."); } - if (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 ApplicationTypeResourceList DeserializeApplicationTypeResourceLi 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 ApplicationTypeResourceList DeserializeApplicationTypeResourceLi } 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 ApplicationTypeResourceList DeserializeApplicationTypeResourceLi } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationTypeResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationTypeResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs index 8bb6ce5c8b54..ef7788b40987 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationTypeResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationTypeResourceList() + /// The ApplicationTypeResource items on this page. + /// is null. + internal ApplicationTypeResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application type list results if there are any. + /// The ApplicationTypeResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationTypeResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationTypeResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationTypeResourceList() + { + } + + /// The ApplicationTypeResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application type list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs index 67ab31aa2c37..cfe83a266252 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationTypeVersionResourceList)} does not support writing '{format}' format."); } - if (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 ApplicationTypeVersionResourceList DeserializeApplicationTypeVer 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 ApplicationTypeVersionResourceList DeserializeApplicationTypeVer } 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 ApplicationTypeVersionResourceList DeserializeApplicationTypeVer } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationTypeVersionResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationTypeVersionResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs index 8202979ab56e..000a5599ff4c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationTypeVersionResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationTypeVersionResourceList() + /// The ApplicationTypeVersionResource items on this page. + /// is null. + internal ApplicationTypeVersionResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application type version list results if there are any. + /// The ApplicationTypeVersionResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationTypeVersionResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationTypeVersionResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationTypeVersionResourceList() + { + } + + /// The ApplicationTypeVersionResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application type version list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs index 224264e1cde7..0be771cf9a52 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs @@ -51,15 +51,12 @@ public ApplicationUpgradePolicy() } /// Initializes a new instance of . - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. /// If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). /// The policy used for monitoring the application upgrade. /// Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description. /// The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. - /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds. /// Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed. /// Keeps track of any properties unknown to the library. internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolicy, bool? forceRestart, RollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy, long? instanceCloseDelayDurationInSeconds, RollingUpgradeMode? upgradeMode, long? upgradeReplicaSetCheckTimeout, bool? recreateApplication, IDictionary serializedAdditionalRawData) @@ -74,10 +71,7 @@ internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolic _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. public ApplicationHealthPolicy ApplicationHealthPolicy { get; set; } /// If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). public bool? ForceRestart { get; set; } @@ -87,7 +81,7 @@ internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolic public long? InstanceCloseDelayDurationInSeconds { get; set; } /// The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. public RollingUpgradeMode? UpgradeMode { get; set; } - /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds. public long? UpgradeReplicaSetCheckTimeout { get; set; } /// Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed. public bool? RecreateApplication { get; set; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs index 66efeff0ee53..ad605312f365 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// The ApplicationUserAssignedIdentityInfo. + /// User assigned identity for the application. public partial class ApplicationUserAssignedIdentityInfo { /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs index 93ff5fa58442..6da34132f1cb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs @@ -12,10 +12,9 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { /// /// This enum is the entrypoint to using a certificate from a public CA for your cluster. This property was introduced to solve the - /// domain squatting problem with new domains. A domain name will be generated in the following format: <clustername>.<hash>.<regionname>.<sfmcdomain>. + /// domain squatting problem with new domains. A domain name will be generated in the following format: {clustername}.{hash}.{regionname}.sfmcdomain. /// The hash portion comes from Azure DNS' Deterministic Name Library. The library creates a hash using the cluster's Tenant, Subscription, Resource Group /// and Resource Name using the AutoGeneratedDomainNameLabelScope/reuse policy chosen. - /// /// public readonly partial struct AutoGeneratedDomainNameLabelScope : IEquatable { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs index ba10a58b2cff..304e1f04a944 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs @@ -32,7 +32,7 @@ public AveragePartitionLoadScalingTrigger(string metricName, double lowerLoadThr } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// The name of the metric for which usage should be tracked. /// The lower limit of the load below which a scale in operation should be performed. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs index 65fc29202c26..7c55a5ab6347 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs @@ -34,7 +34,7 @@ public AverageServiceLoadScalingTrigger(string metricName, double lowerLoadThres } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// The name of the metric for which usage should be tracked. /// The lower limit of the load below which a scale in operation should be performed. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs new file mode 100644 index 000000000000..8e0c1fa700ea --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.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.ServiceFabricManagedClusters.Models +{ + /// The kind of fault simulation. + internal readonly partial struct FaultKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FaultKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ZoneValue = "Zone"; + + /// Simulates an availability zone down. + public static FaultKind Zone { get; } = new FaultKind(ZoneValue); + /// Determines if two values are the same. + public static bool operator ==(FaultKind left, FaultKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FaultKind left, FaultKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FaultKind(string value) => new FaultKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaultKind other && Equals(other); + /// + public bool Equals(FaultKind 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs new file mode 100644 index 000000000000..6cad3e18cca2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs @@ -0,0 +1,195 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(FaultSimulation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SimulationId)) + { + writer.WritePropertyName("simulationId"u8); + writer.WriteStringValue(SimulationId); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + 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(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteObjectValue(Details, 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulation 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(FaultSimulation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulation(document.RootElement, options); + } + + internal static FaultSimulation DeserializeFaultSimulation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string simulationId = default; + FaultSimulationStatus? status = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + FaultSimulationDetails details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("simulationId"u8)) + { + simulationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new FaultSimulationStatus(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("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + details = FaultSimulationDetails.DeserializeFaultSimulationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulation( + simulationId, + status, + startTime, + endTime, + details, + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulation)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulation 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs new file mode 100644 index 000000000000..306e4bffee85 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault simulation object with status. + public partial class FaultSimulation + { + /// + /// 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 FaultSimulation() + { + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Fault simulation status. + /// The start time of the fault simulation. + /// The end time of the fault simulation. + /// Fault simulation details. + /// Keeps track of any properties unknown to the library. + internal FaultSimulation(string simulationId, FaultSimulationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, FaultSimulationDetails details, IDictionary serializedAdditionalRawData) + { + SimulationId = simulationId; + Status = status; + StartOn = startOn; + EndOn = endOn; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// unique identifier for the fault simulation. + public string SimulationId { get; } + /// Fault simulation status. + public FaultSimulationStatus? Status { get; } + /// The start time of the fault simulation. + public DateTimeOffset? StartOn { get; } + /// The end time of the fault simulation. + public DateTimeOffset? EndOn { get; } + /// Fault simulation details. + public FaultSimulationDetails Details { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs new file mode 100644 index 000000000000..fc9c933734f0 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.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.ServiceFabricManagedClusters.Models +{ + internal partial class FaultSimulationConstraints : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(FaultSimulationConstraints)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ExpireOn)) + { + writer.WritePropertyName("expirationTime"u8); + writer.WriteStringValue(ExpireOn.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationConstraints 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(FaultSimulationConstraints)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationConstraints(document.RootElement, options); + } + + internal static FaultSimulationConstraints DeserializeFaultSimulationConstraints(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expirationTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expirationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationConstraints(expirationTime, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationConstraints 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationConstraints(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs new file mode 100644 index 000000000000..56887869e7f1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.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.ServiceFabricManagedClusters.Models +{ + /// Constraints for Fault Simulation action. + internal partial class FaultSimulationConstraints + { + /// + /// 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 FaultSimulationConstraints() + { + } + + /// Initializes a new instance of . + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationConstraints(DateTimeOffset? expireOn, IDictionary serializedAdditionalRawData) + { + ExpireOn = expireOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + public DateTimeOffset? ExpireOn { get; set; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..c60beacc778f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs @@ -0,0 +1,127 @@ +// 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.ServiceFabricManagedClusters.Models +{ + [PersistableModelProxy(typeof(UnknownFaultSimulationContent))] + public partial class FaultSimulationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(FaultSimulationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("faultKind"u8); + writer.WriteStringValue(FaultKind.ToString()); + if (Optional.IsDefined(IsForced)) + { + writer.WritePropertyName("force"u8); + writer.WriteBooleanValue(IsForced.Value); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationContent 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(FaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + + internal static FaultSimulationContent DeserializeFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("faultKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Zone": return ZoneFaultSimulationContent.DeserializeZoneFaultSimulationContent(element, options); + } + } + return UnknownFaultSimulationContent.DeserializeUnknownFaultSimulationContent(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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContent 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs new file mode 100644 index 000000000000..ba06288721b7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.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.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// + /// Parameters for Fault Simulation action. + /// 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 FaultSimulationContent + { + /// + /// 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 FaultSimulationContent() + { + } + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationContent(FaultKind faultKind, bool? isForced, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData) + { + FaultKind = faultKind; + IsForced = isForced; + Constraints = constraints; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The kind of fault to be simulated. + internal FaultKind FaultKind { get; set; } + /// Force the action to go through without any check on the cluster. + public bool? IsForced { get; set; } + /// Constraints for Fault Simulation action. + internal FaultSimulationConstraints Constraints { get; set; } + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + public DateTimeOffset? ConstraintsExpireOn + { + get => Constraints is null ? default : Constraints.ExpireOn; + set + { + if (Constraints is null) + Constraints = new FaultSimulationConstraints(); + Constraints.ExpireOn = value; + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs new file mode 100644 index 000000000000..64867d7a466d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationContentWrapper : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(FaultSimulationContentWrapper)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationContentWrapper 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(FaultSimulationContentWrapper)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContentWrapper(document.RootElement, options); + } + + internal static FaultSimulationContentWrapper DeserializeFaultSimulationContentWrapper(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultSimulationContent parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parameters"u8)) + { + parameters = FaultSimulationContent.DeserializeFaultSimulationContent(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationContentWrapper(parameters, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContentWrapper 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationContentWrapper(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs new file mode 100644 index 000000000000..a5a61e9492fe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.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.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault Simulation Request for Start action. + public partial class FaultSimulationContentWrapper + { + /// + /// 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 . + /// + /// Parameters for Fault Simulation start action. + /// 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 . + /// + /// is null. + public FaultSimulationContentWrapper(FaultSimulationContent parameters) + { + Argument.AssertNotNull(parameters, nameof(parameters)); + + Parameters = parameters; + } + + /// Initializes a new instance of . + /// + /// Parameters for Fault Simulation start action. + /// 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 . + /// + /// Keeps track of any properties unknown to the library. + internal FaultSimulationContentWrapper(FaultSimulationContent parameters, IDictionary serializedAdditionalRawData) + { + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationContentWrapper() + { + } + + /// + /// Parameters for Fault Simulation start action. + /// 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 FaultSimulationContent Parameters { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs new file mode 100644 index 000000000000..ed09aa08239f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs @@ -0,0 +1,180 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(FaultSimulationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ClusterId)) + { + writer.WritePropertyName("clusterId"u8); + writer.WriteStringValue(ClusterId); + } + if (Optional.IsDefined(OperationId)) + { + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + } + if (Optional.IsCollectionDefined(NodeTypeFaultSimulation)) + { + writer.WritePropertyName("nodeTypeFaultSimulation"u8); + writer.WriteStartArray(); + foreach (var item in NodeTypeFaultSimulation) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationDetails 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(FaultSimulationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationDetails(document.RootElement, options); + } + + internal static FaultSimulationDetails DeserializeFaultSimulationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterId = default; + string operationId = default; + IReadOnlyList nodeTypeFaultSimulation = default; + FaultSimulationContent parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterId"u8)) + { + clusterId = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeTypeFaultSimulation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NodeTypeFaultSimulation.DeserializeNodeTypeFaultSimulation(item, options)); + } + nodeTypeFaultSimulation = array; + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parameters = FaultSimulationContent.DeserializeFaultSimulationContent(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationDetails(clusterId, operationId, nodeTypeFaultSimulation ?? new ChangeTrackingList(), parameters, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationDetails 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs new file mode 100644 index 000000000000..cabc8681c0a7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Details for Fault Simulation. + public partial class FaultSimulationDetails + { + /// + /// 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 FaultSimulationDetails() + { + NodeTypeFaultSimulation = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// unique identifier for the cluster resource. + /// unique identifier for the operation associated with the fault simulation. + /// List of node type simulations associated with the cluster fault simulation. + /// + /// Fault simulation parameters. + /// 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 . + /// + /// Keeps track of any properties unknown to the library. + internal FaultSimulationDetails(string clusterId, string operationId, IReadOnlyList nodeTypeFaultSimulation, FaultSimulationContent parameters, IDictionary serializedAdditionalRawData) + { + ClusterId = clusterId; + OperationId = operationId; + NodeTypeFaultSimulation = nodeTypeFaultSimulation; + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// unique identifier for the cluster resource. + public string ClusterId { get; } + /// unique identifier for the operation associated with the fault simulation. + public string OperationId { get; } + /// List of node type simulations associated with the cluster fault simulation. + public IReadOnlyList NodeTypeFaultSimulation { get; } + /// + /// Fault simulation parameters. + /// 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 FaultSimulationContent Parameters { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs new file mode 100644 index 000000000000..53ea9e2c953e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationIdContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(FaultSimulationIdContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("simulationId"u8); + writer.WriteStringValue(SimulationId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationIdContent 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(FaultSimulationIdContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationIdContent(document.RootElement, options); + } + + internal static FaultSimulationIdContent DeserializeFaultSimulationIdContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string simulationId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("simulationId"u8)) + { + simulationId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationIdContent(simulationId, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationIdContent 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationIdContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs new file mode 100644 index 000000000000..561082d66c8b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.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.ServiceFabricManagedClusters.Models +{ + /// Parameters for Fault Simulation id. + public partial class FaultSimulationIdContent + { + /// + /// 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 . + /// unique identifier for the fault simulation. + /// is null. + public FaultSimulationIdContent(string simulationId) + { + Argument.AssertNotNull(simulationId, nameof(simulationId)); + + SimulationId = simulationId; + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationIdContent(string simulationId, IDictionary serializedAdditionalRawData) + { + SimulationId = simulationId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationIdContent() + { + } + + /// unique identifier for the fault simulation. + public string SimulationId { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs new file mode 100644 index 000000000000..3195b7ff047a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.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.ServiceFabricManagedClusters.Models +{ + internal partial class FaultSimulationListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(FaultSimulationListResult)} 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationListResult 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(FaultSimulationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationListResult(document.RootElement, options); + } + + internal static FaultSimulationListResult DeserializeFaultSimulationListResult(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(FaultSimulation.DeserializeFaultSimulation(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 FaultSimulationListResult(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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationListResult 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs new file mode 100644 index 000000000000..f086a5d95071 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.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.ServiceFabricManagedClusters.Models +{ + /// Fault simulation list results. + internal partial class FaultSimulationListResult + { + /// + /// 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 FaultSimulation items on this page. + /// is null. + internal FaultSimulationListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FaultSimulation items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationListResult() + { + } + + /// The FaultSimulation items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs new file mode 100644 index 000000000000..e5ab863f8fd3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.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.ServiceFabricManagedClusters.Models +{ + /// Fault simulation status. + public readonly partial struct FaultSimulationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FaultSimulationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartingValue = "Starting"; + private const string ActiveValue = "Active"; + private const string StoppingValue = "Stopping"; + private const string DoneValue = "Done"; + private const string StartFailedValue = "StartFailed"; + private const string StopFailedValue = "StopFailed"; + + /// Indicates the fault simulation is starting. The simulation will have this status while the start operation is in progress. + public static FaultSimulationStatus Starting { get; } = new FaultSimulationStatus(StartingValue); + /// Indicates the fault simulation is active. The simulation will have this status after the start operation has completed successfully. + public static FaultSimulationStatus Active { get; } = new FaultSimulationStatus(ActiveValue); + /// Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in progress. + public static FaultSimulationStatus Stopping { get; } = new FaultSimulationStatus(StoppingValue); + /// Indicates the fault simulation is done. The simulation will have this status after the stop operation has completed successfully. + public static FaultSimulationStatus Done { get; } = new FaultSimulationStatus(DoneValue); + /// Indicates the fault simulation has failed on start. The simulation will have this status after the start operation fails. + public static FaultSimulationStatus StartFailed { get; } = new FaultSimulationStatus(StartFailedValue); + /// Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation fails. + public static FaultSimulationStatus StopFailed { get; } = new FaultSimulationStatus(StopFailedValue); + /// Determines if two values are the same. + public static bool operator ==(FaultSimulationStatus left, FaultSimulationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FaultSimulationStatus left, FaultSimulationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FaultSimulationStatus(string value) => new FaultSimulationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaultSimulationStatus other && Equals(other); + /// + public bool Equals(FaultSimulationStatus 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs index 1b1be8162594..b00a0fcb43b7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Defines a health policy used to evaluate the health of the cluster or of a cluster node. - /// - /// + /// Defines a health policy used to evaluate the health of the cluster or of a cluster node. public partial class ManagedClusterHealthPolicy { /// @@ -58,7 +55,6 @@ public partial class ManagedClusterHealthPolicy /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// /// /// The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. @@ -67,7 +63,6 @@ public partial class ManagedClusterHealthPolicy /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUnhealthyApplications) { @@ -85,7 +80,6 @@ public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUn /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// /// /// The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. @@ -94,7 +88,6 @@ public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUnhealthyApplications, IDictionary serializedAdditionalRawData) @@ -118,7 +111,6 @@ internal ManagedClusterHealthPolicy() /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// public int MaxPercentUnhealthyNodes { get; set; } /// @@ -128,7 +120,6 @@ internal ManagedClusterHealthPolicy() /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// public int MaxPercentUnhealthyApplications { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs index 3f70fbbc9495..1ed68951f899 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedClusterListResult)} does not support writing '{format}' format."); } - if (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); } + 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 ManagedClusterListResult DeserializeManagedClusterListResult(Jso 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 ManagedClusterListResult DeserializeManagedClusterListResult(Jso } 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 ManagedClusterListResult DeserializeManagedClusterListResult(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedClusterListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedClusterListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs index d5dcf33c771a..d6bf08df3ab3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Managed Cluster list results. + /// The response of a ManagedCluster list operation. internal partial class ManagedClusterListResult { /// @@ -46,25 +47,34 @@ internal partial class ManagedClusterListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedClusterListResult() + /// The ManagedCluster items on this page. + /// is null. + internal ManagedClusterListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// The URL to use for getting the next set of results. + /// The ManagedCluster items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ManagedClusterListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedClusterListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ManagedClusterListResult() + { + } + + /// The ManagedCluster items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs index 51171890e958..e97fabee20af 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// the reference to the load balancer probe used by the load balancing rule. + /// The reference to the load balancer probe used by the load balancing rule. public readonly partial struct ManagedClusterLoadBalanceProbeProtocol : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public ManagedClusterLoadBalanceProbeProtocol(string value) private const string HttpValue = "http"; private const string HttpsValue = "https"; - /// tcp. + /// Probe protocol is TCP. public static ManagedClusterLoadBalanceProbeProtocol Tcp { get; } = new ManagedClusterLoadBalanceProbeProtocol(TcpValue); - /// http. + /// Probe protocol is HTTP. public static ManagedClusterLoadBalanceProbeProtocol Http { get; } = new ManagedClusterLoadBalanceProbeProtocol(HttpValue); - /// https. + /// Probe protocol is HTTPS. public static ManagedClusterLoadBalanceProbeProtocol Https { get; } = new ManagedClusterLoadBalanceProbeProtocol(HttpsValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterLoadBalanceProbeProtocol left, ManagedClusterLoadBalanceProbeProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs index 9ab3a0a1a5c4..52219d84fbff 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs @@ -25,9 +25,9 @@ public ManagedClusterLoadBalancingRuleTransportProtocol(string value) private const string TcpValue = "tcp"; private const string UdpValue = "udp"; - /// tcp. + /// Transport protocol is TCP. public static ManagedClusterLoadBalancingRuleTransportProtocol Tcp { get; } = new ManagedClusterLoadBalancingRuleTransportProtocol(TcpValue); - /// udp. + /// Transport protocol is UDP. public static ManagedClusterLoadBalancingRuleTransportProtocol Udp { get; } = new ManagedClusterLoadBalancingRuleTransportProtocol(UdpValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterLoadBalancingRuleTransportProtocol left, ManagedClusterLoadBalancingRuleTransportProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs index 523bc27925b4..45ad368f6a98 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs @@ -25,9 +25,9 @@ public ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(string value) private const string EnabledValue = "enabled"; private const string DisabledValue = "disabled"; - /// enabled. + /// Enable apply network policies on private end point in the subnet. public static ManagedClusterSubnetPrivateEndpointNetworkPoliciesState Enabled { get; } = new ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(EnabledValue); - /// disabled. + /// Disable apply network policies on private end point in the subnet. public static ManagedClusterSubnetPrivateEndpointNetworkPoliciesState Disabled { get; } = new ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterSubnetPrivateEndpointNetworkPoliciesState left, ManagedClusterSubnetPrivateEndpointNetworkPoliciesState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs index 42bdf2410c11..b119ff8d404d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs @@ -25,9 +25,9 @@ public ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(string value) private const string EnabledValue = "enabled"; private const string DisabledValue = "disabled"; - /// enabled. + /// Enable apply network policies on private link service in the subnet. public static ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState Enabled { get; } = new ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(EnabledValue); - /// disabled. + /// Disable apply network policies on private link service in the subnet. public static ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState Disabled { get; } = new ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState left, ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs index dd6d220ba1db..4badc04fcada 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs @@ -50,7 +50,6 @@ public partial class ManagedClusterUpgradeDeltaHealthPolicy /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// public ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes) { @@ -62,20 +61,17 @@ public ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes) /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// /// /// The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. - /// /// /// /// The maximum allowed percentage of applications health degradation allowed during cluster upgrades. /// The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. /// NOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes, int? maxPercentUpgradeDomainDeltaUnhealthyNodes, int? maxPercentDeltaUnhealthyApplications, IDictionary serializedAdditionalRawData) @@ -95,14 +91,12 @@ internal ManagedClusterUpgradeDeltaHealthPolicy() /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// public int MaxPercentDeltaUnhealthyNodes { get; set; } /// /// The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. - /// /// public int? MaxPercentUpgradeDomainDeltaUnhealthyNodes { get; set; } /// @@ -110,7 +104,6 @@ internal ManagedClusterUpgradeDeltaHealthPolicy() /// The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. /// NOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications - /// /// public int? MaxPercentDeltaUnhealthyApplications { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs index 61b64b828fac..1defa7a18438 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. public readonly partial struct ManagedClusterUpgradeMode : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs index b81f3679e867..f0485b8f0682 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs @@ -60,7 +60,6 @@ public ManagedClusterUpgradePolicy() /// When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. /// The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// This value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds) - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterUpgradePolicy(bool? forceRestart, ManagedClusterHealthPolicy healthPolicy, ManagedClusterUpgradeDeltaHealthPolicy deltaHealthPolicy, ManagedClusterMonitoringPolicy monitoringPolicy, string upgradeReplicaSetCheckTimeout, IDictionary serializedAdditionalRawData) @@ -86,7 +85,6 @@ internal ManagedClusterUpgradePolicy(bool? forceRestart, ManagedClusterHealthPol /// When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. /// The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// This value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds) - /// /// public string UpgradeReplicaSetCheckTimeout { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs index e53367088cb0..57533e1b624b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// The ManagedClusterVersionEnvironment. + /// The operating system of the cluster. The default means all. public readonly partial struct ManagedClusterVersionEnvironment : IEquatable { private readonly string _value; @@ -24,7 +24,7 @@ public ManagedClusterVersionEnvironment(string value) private const string WindowsValue = "Windows"; - /// Windows. + /// Indicates os is Windows. public static ManagedClusterVersionEnvironment Windows { get; } = new ManagedClusterVersionEnvironment(WindowsValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterVersionEnvironment left, ManagedClusterVersionEnvironment right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs index 167903cc1116..990b8c2bd087 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs @@ -55,7 +55,7 @@ protected ManagedServicePartitionScheme() } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. internal ManagedServicePartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServicePartitionScheme(PartitionScheme partitionScheme, IDiction _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies how the service is partitioned. + /// Gets or sets the partition scheme. internal PartitionScheme PartitionScheme { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs index 4b13ee0115f7..5108f968fb04 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.ToString()); + writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs index 3686a80b13d4..1f66610be8b6 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs @@ -55,15 +55,15 @@ protected ManagedServicePlacementPolicy() } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. - internal ManagedServicePlacementPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) + internal ManagedServicePlacementPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) { - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of placement policy for a service fabric service. Following are the possible values. - internal ServicePlacementPolicyType ServicePlacementPolicyType { get; set; } + /// Gets or sets the type. + internal ServicePlacementPolicyType Type { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs index 516cce220525..2504f81d0542 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs @@ -85,7 +85,7 @@ internal static ManagedServiceProperties DeserializeManagedServiceProperties(Jso case "Stateless": return StatelessServiceProperties.DeserializeStatelessServiceProperties(element, options); } } - return UnknownServiceResourceProperties.DeserializeUnknownServiceResourceProperties(element, options); + return UnknownManagedServiceProperties.DeserializeUnknownManagedServiceProperties(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs index 0731e7984a01..b431c89eeec7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs @@ -59,7 +59,6 @@ public ManagedServiceProperties(string serviceTypeName, ManagedServicePartitionS /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// internal ManagedServiceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData) { @@ -94,7 +93,6 @@ internal ManagedServiceProperties() /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// public string ServiceDnsName { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs index 5c341af17b14..90149da6c175 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs @@ -55,7 +55,7 @@ protected ManagedServiceScalingMechanism() } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal ManagedServiceScalingMechanism(ServiceScalingMechanismKind kind, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServiceScalingMechanism(ServiceScalingMechanismKind kind, IDicti _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies the mechanism associated with this scaling policy. + /// Gets or sets the kind. internal ServiceScalingMechanismKind Kind { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs index f71540f773bb..9842d2a487ad 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs @@ -55,7 +55,7 @@ protected ManagedServiceScalingTrigger() } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal ManagedServiceScalingTrigger(ServiceScalingTriggerKind kind, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServiceScalingTrigger(ServiceScalingTriggerKind kind, IDictionar _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies the trigger associated with this scaling policy. + /// Gets or sets the kind. internal ServiceScalingTriggerKind Kind { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs index 85ebbda055e0..e74de50546a0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedVmSizesResult)} does not support writing '{format}' format."); } - if (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 ManagedVmSizesResult DeserializeManagedVmSizesResult(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 ManagedVmSizesResult DeserializeManagedVmSizesResult(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 ManagedVmSizesResult DeserializeManagedVmSizesResult(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedVmSizesResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedVmSizesResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs index fc122ae20208..56698751577c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ManagedVmSizesResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedVmSizesResult() + /// The ManagedVMSize items on this page. + /// is null. + internal ManagedVmSizesResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// List of Managed VM Sizes for Service Fabric Managed Clusters. - /// URL to get the next set of Managed VM Sizes if there are any. + /// The ManagedVMSize items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ManagedVmSizesResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedVmSizesResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of Managed VM Sizes for Service Fabric Managed Clusters. + /// Initializes a new instance of for deserialization. + internal ManagedVmSizesResult() + { + } + + /// The ManagedVMSize items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of Managed VM Sizes if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs index bf4c12644bce..05e0a2e9f806 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs @@ -26,7 +26,7 @@ public NamedPartitionAddOrRemoveScalingMechanism(int minPartitionCount, int maxP } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// Minimum number of named partitions of the service. /// Maximum number of named partitions of the service. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs index 6f9a855375bd..35bd1d7f33c1 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs @@ -26,7 +26,7 @@ public NamedPartitionScheme(IEnumerable names) } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. /// Array for the names of the partitions. internal NamedPartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData, IList names) : base(partitionScheme, serializedAdditionalRawData) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs index 87d5a05613fa..04504dc621ce 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs @@ -52,7 +52,7 @@ internal NodeTypeAvailableSku() } /// Initializes a new instance of . - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. /// The supported SKU for a for node type. /// Provides information about how the node count can be scaled. /// Keeps track of any properties unknown to the library. @@ -64,7 +64,7 @@ internal NodeTypeAvailableSku(ResourceType? resourceType, NodeTypeSupportedSku s _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. public ResourceType? ResourceType { get; } /// The supported SKU for a for node type. public NodeTypeSupportedSku Sku { get; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs new file mode 100644 index 000000000000..1ca63568c204 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.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.ServiceFabricManagedClusters.Models +{ + public partial class NodeTypeFaultSimulation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(NodeTypeFaultSimulation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NodeTypeName)) + { + writer.WritePropertyName("nodeTypeName"u8); + writer.WriteStringValue(NodeTypeName); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(OperationId)) + { + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + } + if (Optional.IsDefined(OperationStatus)) + { + writer.WritePropertyName("operationStatus"u8); + writer.WriteStringValue(OperationStatus.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NodeTypeFaultSimulation 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(NodeTypeFaultSimulation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNodeTypeFaultSimulation(document.RootElement, options); + } + + internal static NodeTypeFaultSimulation DeserializeNodeTypeFaultSimulation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nodeTypeName = default; + FaultSimulationStatus? status = default; + string operationId = default; + SfmcOperationStatus? operationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeTypeName"u8)) + { + nodeTypeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new FaultSimulationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationStatus = new SfmcOperationStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NodeTypeFaultSimulation(nodeTypeName, status, operationId, operationStatus, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support writing '{options.Format}' format."); + } + } + + NodeTypeFaultSimulation 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNodeTypeFaultSimulation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs new file mode 100644 index 000000000000..f35030c3aaea --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.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.ServiceFabricManagedClusters.Models +{ + /// Node type fault simulation object with status. + public partial class NodeTypeFaultSimulation + { + /// + /// 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 NodeTypeFaultSimulation() + { + } + + /// Initializes a new instance of . + /// Node type name. + /// Fault simulation status. + /// Current or latest asynchronous operation identifier on the node type. + /// Current or latest asynchronous operation status on the node type. + /// Keeps track of any properties unknown to the library. + internal NodeTypeFaultSimulation(string nodeTypeName, FaultSimulationStatus? status, string operationId, SfmcOperationStatus? operationStatus, IDictionary serializedAdditionalRawData) + { + NodeTypeName = nodeTypeName; + Status = status; + OperationId = operationId; + OperationStatus = operationStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Node type name. + public string NodeTypeName { get; } + /// Fault simulation status. + public FaultSimulationStatus? Status { get; } + /// Current or latest asynchronous operation identifier on the node type. + public string OperationId { get; } + /// Current or latest asynchronous operation status on the node type. + public SfmcOperationStatus? OperationStatus { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs index 98c10a514de6..39f0769b4399 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs @@ -110,7 +110,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("loadBalancerBackendAddressPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -119,7 +119,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("loadBalancerInboundNatPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -128,7 +128,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("applicationGatewayBackendAddressPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs index 6ea1a340bb4b..c623a8a34b99 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs @@ -53,9 +53,9 @@ public NodeTypeFrontendConfiguration() /// Initializes a new instance of . /// The IP address type of this frontend configuration. If omitted the default value is IPv4. - /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. - /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. - /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/applicationGateways/<applicationGatewayName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. + /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. + /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. /// Keeps track of any properties unknown to the library. internal NodeTypeFrontendConfiguration(NodeTypeFrontendConfigurationIPAddressType? ipAddressType, ResourceIdentifier loadBalancerBackendAddressPoolId, ResourceIdentifier loadBalancerInboundNatPoolId, ResourceIdentifier applicationGatewayBackendAddressPoolId, IDictionary serializedAdditionalRawData) { @@ -68,11 +68,11 @@ internal NodeTypeFrontendConfiguration(NodeTypeFrontendConfigurationIPAddressTyp /// The IP address type of this frontend configuration. If omitted the default value is IPv4. public NodeTypeFrontendConfigurationIPAddressType? IPAddressType { get; set; } - /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. public ResourceIdentifier LoadBalancerBackendAddressPoolId { get; set; } - /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. + /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. public ResourceIdentifier LoadBalancerInboundNatPoolId { get; set; } - /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/applicationGateways/<applicationGatewayName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. public ResourceIdentifier ApplicationGatewayBackendAddressPoolId { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs index 484c040b77be..d391ebfc2928 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The IP address type. - /// - /// + /// The IP address type. public readonly partial struct NodeTypeFrontendConfigurationIPAddressType : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs index fc21606b2248..08295564100d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NodeTypeListResult)} does not support writing '{format}' format."); } - if (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); } + 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 NodeTypeListResult DeserializeNodeTypeListResult(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 NodeTypeListResult DeserializeNodeTypeListResult(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 NodeTypeListResult DeserializeNodeTypeListResult(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new NodeTypeListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new NodeTypeListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs index 2d0765b4533a..8fedc17515d3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Node type list results. + /// The response of a NodeType list operation. internal partial class NodeTypeListResult { /// @@ -46,25 +47,34 @@ internal partial class NodeTypeListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal NodeTypeListResult() + /// The NodeType items on this page. + /// is null. + internal NodeTypeListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The list of node types. - /// The URL to use for getting the next set of results. + /// The NodeType items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal NodeTypeListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal NodeTypeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of node types. + /// Initializes a new instance of for deserialization. + internal NodeTypeListResult() + { + } + + /// The NodeType items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs index c6567ec03aa8..2ba597e0f78e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NodeTypeListSkuResult)} does not support writing '{format}' format."); } - if (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); } + 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 NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(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 NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(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 NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new NodeTypeListSkuResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new NodeTypeListSkuResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs index 8eadedc19e8b..4040137bb30d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class NodeTypeListSkuResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal NodeTypeListSkuResult() + /// The NodeTypeAvailableSku items on this page. + /// is null. + internal NodeTypeListSkuResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The list of available node type SKUs. - /// The URL to use for getting the next set of results. + /// The NodeTypeAvailableSku items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal NodeTypeListSkuResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal NodeTypeListSkuResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of available node type SKUs. + /// Initializes a new instance of for deserialization. + internal NodeTypeListSkuResult() + { + } + + /// The NodeTypeAvailableSku items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSecurityEncryptionType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSecurityEncryptionType.cs new file mode 100644 index 000000000000..0d44e0f9adf3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSecurityEncryptionType.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.ServiceFabricManagedClusters.Models +{ + /// Specifies the securityEncryptionType type of the nodeType. Only DiskWithVMGuestState and VMGuestStateOnly are currently supported. + public readonly partial struct NodeTypeSecurityEncryptionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NodeTypeSecurityEncryptionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DiskWithVmGuestStateValue = "DiskWithVMGuestState"; + private const string VmGuestStateOnlyValue = "VMGuestStateOnly"; + + /// For encryption of the managed disk along with VMGuestState blob. + public static NodeTypeSecurityEncryptionType DiskWithVmGuestState { get; } = new NodeTypeSecurityEncryptionType(DiskWithVmGuestStateValue); + /// For encryption of just the VMGuestState blob. + public static NodeTypeSecurityEncryptionType VmGuestStateOnly { get; } = new NodeTypeSecurityEncryptionType(VmGuestStateOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(NodeTypeSecurityEncryptionType left, NodeTypeSecurityEncryptionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NodeTypeSecurityEncryptionType left, NodeTypeSecurityEncryptionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NodeTypeSecurityEncryptionType(string value) => new NodeTypeSecurityEncryptionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NodeTypeSecurityEncryptionType other && Equals(other); + /// + public bool Equals(NodeTypeSecurityEncryptionType 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs index 3f968c3092db..f65d70bf429d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs @@ -46,16 +46,16 @@ public partial class NodeTypeSku private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. public NodeTypeSku(int capacity) { Capacity = capacity; } /// Initializes a new instance of . - /// The sku name. <br /><br />Name is internally generated and is used in auto-scale scenarios.<br /> Property does not allow to be changed to other values than generated.<br /> To avoid deployment errors please omit the property. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. + /// Specifies the tier of the node type. Possible Values: **Standard**. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. /// Keeps track of any properties unknown to the library. internal NodeTypeSku(string name, string tier, int capacity, IDictionary serializedAdditionalRawData) { @@ -70,11 +70,11 @@ internal NodeTypeSku() { } - /// The sku name. <br /><br />Name is internally generated and is used in auto-scale scenarios.<br /> Property does not allow to be changed to other values than generated.<br /> To avoid deployment errors please omit the property. + /// The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. public string Name { get; set; } - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. public string Tier { get; set; } - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. public int Capacity { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs index 206c80fe8cfc..a68f9fb73b77 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Node type capacity scale type. - /// - /// + /// Node type capacity scale type. public readonly partial struct NodeTypeSkuScaleType : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs index 481f543cb6f9..ba76ea4ae824 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs @@ -52,7 +52,7 @@ internal NodeTypeSupportedSku() /// Initializes a new instance of . /// The sku name. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. /// Keeps track of any properties unknown to the library. internal NodeTypeSupportedSku(string name, string tier, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal NodeTypeSupportedSku(string name, string tier, IDictionary The sku name. public string Name { get; } - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. public string Tier { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs index 27f95298c1ce..09f9b3a2cff3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs @@ -47,7 +47,7 @@ public partial class NodeTypeVaultCertificate /// Initializes a new instance of . /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. /// or is null. public NodeTypeVaultCertificate(Uri certificateUri, string certificateStore) { @@ -60,7 +60,7 @@ public NodeTypeVaultCertificate(Uri certificateUri, string certificateStore) /// Initializes a new instance of . /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. /// Keeps track of any properties unknown to the library. internal NodeTypeVaultCertificate(Uri certificateUri, string certificateStore, IDictionary serializedAdditionalRawData) { @@ -76,7 +76,7 @@ internal NodeTypeVaultCertificate() /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). public Uri CertificateUri { get; set; } - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. public string CertificateStore { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs index 0ee96e2078b2..385c027006bb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs @@ -26,7 +26,7 @@ public PartitionInstanceCountScalingMechanism(int minInstanceCount, int maxInsta } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// Minimum number of instances of the partition. /// Maximum number of instances of the partition. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs index 5e5212d71498..57222883843a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs @@ -10,12 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. - /// Rollback specifies that the upgrade will start rolling back automatically. - /// Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. - /// - /// + /// The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. public readonly partial struct PolicyViolationCompensationAction : IEquatable { private readonly string _value; @@ -30,9 +25,9 @@ public PolicyViolationCompensationAction(string value) private const string RollbackValue = "Rollback"; private const string ManualValue = "Manual"; - /// The upgrade will start rolling back automatically. The value is 0. + /// Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. public static PolicyViolationCompensationAction Rollback { get; } = new PolicyViolationCompensationAction(RollbackValue); - /// The upgrade will switch to UnmonitoredManual upgrade mode. The value is 1. + /// Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically. public static PolicyViolationCompensationAction Manual { get; } = new PolicyViolationCompensationAction(ManualValue); /// Determines if two values are the same. public static bool operator ==(PolicyViolationCompensationAction left, PolicyViolationCompensationAction right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs index 95a9e61c9e45..b6ff38c0cdaa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs @@ -63,7 +63,7 @@ public ServiceFabricManagedClusterIPConfiguration(string name) /// Initializes a new instance of . /// Name of the network interface. /// Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway. - /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. . + /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. /// Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. /// Specifies the subnet of the network interface. /// Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. @@ -90,7 +90,7 @@ internal ServiceFabricManagedClusterIPConfiguration() public string Name { get; set; } /// Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway. public IList ApplicationGatewayBackendAddressPools { get; } - /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. . + /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. public IList LoadBalancerBackendAddressPools { get; } /// Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. public IList LoadBalancerInboundNatPools { get; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs index 40a9677722a4..8e3e13588282 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedClusterPrivateIPAddressVersion(string value) private const string IPv4Value = "IPv4"; private const string IPv6Value = "IPv6"; - /// IPv4. + /// The IP configuration's private IP is IPv4. public static ServiceFabricManagedClusterPrivateIPAddressVersion IPv4 { get; } = new ServiceFabricManagedClusterPrivateIPAddressVersion(IPv4Value); - /// IPv6. + /// The IP configuration's private IP is IPv6. public static ServiceFabricManagedClusterPrivateIPAddressVersion IPv6 { get; } = new ServiceFabricManagedClusterPrivateIPAddressVersion(IPv6Value); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterPrivateIPAddressVersion left, ServiceFabricManagedClusterPrivateIPAddressVersion right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs index 0364d55d0297..29653f7414db 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedClusterPublicIPAddressVersion(string value) private const string IPv4Value = "IPv4"; private const string IPv6Value = "IPv6"; - /// IPv4. + /// The IP configuration's public IP is IPv4. public static ServiceFabricManagedClusterPublicIPAddressVersion IPv4 { get; } = new ServiceFabricManagedClusterPublicIPAddressVersion(IPv4Value); - /// IPv6. + /// The IP configuration's public IP is IPv6. public static ServiceFabricManagedClusterPublicIPAddressVersion IPv6 { get; } = new ServiceFabricManagedClusterPublicIPAddressVersion(IPv6Value); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterPublicIPAddressVersion left, ServiceFabricManagedClusterPublicIPAddressVersion right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs index e92b13e4d122..ebe1d44168a2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs @@ -24,11 +24,14 @@ public ServiceFabricManagedClusterSecurityType(string value) private const string TrustedLaunchValue = "TrustedLaunch"; private const string StandardValue = "Standard"; + private const string ConfidentialVmValue = "ConfidentialVM"; /// Trusted Launch is a security type that secures generation 2 virtual machines. public static ServiceFabricManagedClusterSecurityType TrustedLaunch { get; } = new ServiceFabricManagedClusterSecurityType(TrustedLaunchValue); /// Standard is the default security type for all machines. public static ServiceFabricManagedClusterSecurityType Standard { get; } = new ServiceFabricManagedClusterSecurityType(StandardValue); + /// ConfidentialVM provides hardware-based encryption, trusted execution environment (TEE) and isolation of the VM memory & CPU from host. + public static ServiceFabricManagedClusterSecurityType ConfidentialVm { get; } = new ServiceFabricManagedClusterSecurityType(ConfidentialVmValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterSecurityType left, ServiceFabricManagedClusterSecurityType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs index fa7d0caddfcd..05f4888f6710 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The current state of the cluster. - /// - /// + /// The current state of the cluster. public readonly partial struct ServiceFabricManagedClusterState : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs index afcbaebcb9da..03b8f0fe5f4b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs @@ -127,7 +127,7 @@ internal static ServiceFabricManagedClusterVersion DeserializeServiceFabricManag } if (property0.NameEquals("supportExpiryUtc"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs index 20a60bfafb70..b982ee07017f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. - /// - /// + /// Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. public readonly partial struct ServiceFabricManagedDataDiskType : IEquatable { private readonly string _value; @@ -28,6 +25,9 @@ public ServiceFabricManagedDataDiskType(string value) private const string StandardLrsValue = "Standard_LRS"; private const string StandardSsdLrsValue = "StandardSSD_LRS"; private const string PremiumLrsValue = "Premium_LRS"; + private const string PremiumV2LRSValue = "PremiumV2_LRS"; + private const string PremiumZrsValue = "StandardSSD_ZRS"; + private const string PremiumZRSValue = "Premium_ZRS"; /// Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. public static ServiceFabricManagedDataDiskType StandardLrs { get; } = new ServiceFabricManagedDataDiskType(StandardLrsValue); @@ -35,6 +35,12 @@ public ServiceFabricManagedDataDiskType(string value) public static ServiceFabricManagedDataDiskType StandardSsdLrs { get; } = new ServiceFabricManagedDataDiskType(StandardSsdLrsValue); /// Premium SSD locally redundant storage. Best for production and performance sensitive workloads. public static ServiceFabricManagedDataDiskType PremiumLrs { get; } = new ServiceFabricManagedDataDiskType(PremiumLrsValue); + /// Premium SSD V2 locally redundant storage. Best for production and performance sensitive workloads that consistently require low latency and high IOPS and throughput. + public static ServiceFabricManagedDataDiskType PremiumV2LRS { get; } = new ServiceFabricManagedDataDiskType(PremiumV2LRSValue); + /// Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures. + public static ServiceFabricManagedDataDiskType PremiumZrs { get; } = new ServiceFabricManagedDataDiskType(PremiumZrsValue); + /// Premium SSD zone redundant storage. Best for production workloads that need storage resiliency against zone failures. + public static ServiceFabricManagedDataDiskType PremiumZRS { get; } = new ServiceFabricManagedDataDiskType(PremiumZRSValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedDataDiskType left, ServiceFabricManagedDataDiskType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs index 39249cd693d9..70ddf5f08095 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedNetworkSecurityRuleDirection(string value) private const string InboundValue = "inbound"; private const string OutboundValue = "outbound"; - /// inbound. + /// Inbound direction. public static ServiceFabricManagedNetworkSecurityRuleDirection Inbound { get; } = new ServiceFabricManagedNetworkSecurityRuleDirection(InboundValue); - /// outbound. + /// Outbound direction. public static ServiceFabricManagedNetworkSecurityRuleDirection Outbound { get; } = new ServiceFabricManagedNetworkSecurityRuleDirection(OutboundValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNetworkSecurityRuleDirection left, ServiceFabricManagedNetworkSecurityRuleDirection right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs index cc6e9b03b4b7..a320e84cfb55 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedNetworkTrafficAccess(string value) private const string AllowValue = "allow"; private const string DenyValue = "deny"; - /// allow. + /// The network traffic is allowed. public static ServiceFabricManagedNetworkTrafficAccess Allow { get; } = new ServiceFabricManagedNetworkTrafficAccess(AllowValue); - /// deny. + /// The network traffic is denied. public static ServiceFabricManagedNetworkTrafficAccess Deny { get; } = new ServiceFabricManagedNetworkTrafficAccess(DenyValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNetworkTrafficAccess left, ServiceFabricManagedNetworkTrafficAccess right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs index d4964713d19d..1f466b3b767c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs @@ -30,19 +30,19 @@ public ServiceFabricManagedNsgProtocol(string value) private const string AHValue = "ah"; private const string EspValue = "esp"; - /// http. + /// Protocol applies to HTTP. public static ServiceFabricManagedNsgProtocol Http { get; } = new ServiceFabricManagedNsgProtocol(HttpValue); - /// https. + /// Protocol applies to HTTPS. public static ServiceFabricManagedNsgProtocol Https { get; } = new ServiceFabricManagedNsgProtocol(HttpsValue); - /// tcp. + /// Protocol applies to TCP. public static ServiceFabricManagedNsgProtocol Tcp { get; } = new ServiceFabricManagedNsgProtocol(TcpValue); - /// udp. + /// Protocol applies to UDP. public static ServiceFabricManagedNsgProtocol Udp { get; } = new ServiceFabricManagedNsgProtocol(UdpValue); - /// icmp. + /// Protocol applies to ICMP. public static ServiceFabricManagedNsgProtocol Icmp { get; } = new ServiceFabricManagedNsgProtocol(IcmpValue); - /// ah. + /// Protocol applies to AH. public static ServiceFabricManagedNsgProtocol AH { get; } = new ServiceFabricManagedNsgProtocol(AHValue); - /// esp. + /// Protocol applies to ESP. public static ServiceFabricManagedNsgProtocol Esp { get; } = new ServiceFabricManagedNsgProtocol(EspValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNsgProtocol left, ServiceFabricManagedNsgProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs index 108b27d76f8b..1a7a121e303e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs @@ -33,25 +33,25 @@ public ServiceFabricManagedResourceProvisioningState(string value) private const string DeletedValue = "Deleted"; private const string OtherValue = "Other"; - /// None. + /// The resource does not have a provisioning state. public static ServiceFabricManagedResourceProvisioningState None { get; } = new ServiceFabricManagedResourceProvisioningState(NoneValue); - /// Creating. + /// The resource is being created. public static ServiceFabricManagedResourceProvisioningState Creating { get; } = new ServiceFabricManagedResourceProvisioningState(CreatingValue); - /// Created. + /// The resource is created. public static ServiceFabricManagedResourceProvisioningState Created { get; } = new ServiceFabricManagedResourceProvisioningState(CreatedValue); - /// Updating. + /// The resource is being updated. public static ServiceFabricManagedResourceProvisioningState Updating { get; } = new ServiceFabricManagedResourceProvisioningState(UpdatingValue); - /// Succeeded. + /// The resource provisioning has succeeded. public static ServiceFabricManagedResourceProvisioningState Succeeded { get; } = new ServiceFabricManagedResourceProvisioningState(SucceededValue); - /// Failed. + /// The resource provisioning has failed. public static ServiceFabricManagedResourceProvisioningState Failed { get; } = new ServiceFabricManagedResourceProvisioningState(FailedValue); - /// Canceled. + /// The resource provisioning has been canceled. public static ServiceFabricManagedResourceProvisioningState Canceled { get; } = new ServiceFabricManagedResourceProvisioningState(CanceledValue); - /// Deleting. + /// The resource is being deleted. public static ServiceFabricManagedResourceProvisioningState Deleting { get; } = new ServiceFabricManagedResourceProvisioningState(DeletingValue); - /// Deleted. + /// The resource has been deleted. public static ServiceFabricManagedResourceProvisioningState Deleted { get; } = new ServiceFabricManagedResourceProvisioningState(DeletedValue); - /// Other. + /// The resource provisioning state is a state other than the previously specified states. public static ServiceFabricManagedResourceProvisioningState Other { get; } = new ServiceFabricManagedResourceProvisioningState(OtherValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedResourceProvisioningState left, ServiceFabricManagedResourceProvisioningState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs index cff1f5445b2d..9ebfd004ef3b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs @@ -21,17 +21,17 @@ public ServicePlacementInvalidDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.InvalidDomain; + Type = ServicePlacementPolicyType.InvalidDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should not be used for placement. - internal ServicePlacementInvalidDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementInvalidDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs index 7aa19caf4d91..ecd13bad6e39 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs @@ -10,21 +10,21 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// ServicePlacementNonPartiallyPlaceServicePolicy. + /// The type of placement policy for a service fabric service. Following are the possible values. public partial class ServicePlacementNonPartiallyPlaceServicePolicy : ManagedServicePlacementPolicy { /// Initializes a new instance of . public ServicePlacementNonPartiallyPlaceServicePolicy() { - ServicePlacementPolicyType = ServicePlacementPolicyType.NonPartiallyPlaceService; + Type = ServicePlacementPolicyType.NonPartiallyPlaceService; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. - internal ServicePlacementNonPartiallyPlaceServicePolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementNonPartiallyPlaceServicePolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) { - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs index 86b67e4edbd6..eb7bd946493c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs @@ -19,7 +19,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional /// or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica /// may not end up located in this domain due to failures, capacity limits, or other constraints. - /// /// public partial class ServicePlacementPreferPrimaryDomainPolicy : ManagedServicePlacementPolicy { @@ -31,17 +30,17 @@ public ServicePlacementPreferPrimaryDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.PreferredPrimaryDomain; + Type = ServicePlacementPolicyType.PreferredPrimaryDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementPreferPrimaryDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementPreferPrimaryDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs index d28185f9259e..8b23ccfaad15 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs @@ -20,7 +20,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// In the event that one of the datacenters goes offline, normally the replica that was placed in that /// datacenter will be packed into one of the remaining datacenters. If this is not desirable then this /// policy should be set. - /// /// public partial class ServicePlacementRequireDomainDistributionPolicy : ManagedServicePlacementPolicy { @@ -32,17 +31,17 @@ public ServicePlacementRequireDomainDistributionPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.RequiredDomainDistribution; + Type = ServicePlacementPolicyType.RequiredDomainDistribution; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementRequireDomainDistributionPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementRequireDomainDistributionPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs index 8689e98740ad..c07a4630f0e5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs @@ -21,17 +21,17 @@ public ServicePlacementRequiredDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.RequiredDomain; + Type = ServicePlacementPolicyType.RequiredDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementRequiredDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementRequiredDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs index c39d77767ed2..e98c7a0253e0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServiceResourceList)} does not support writing '{format}' format."); } - if (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 ServiceResourceList DeserializeServiceResourceList(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 ServiceResourceList DeserializeServiceResourceList(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 ServiceResourceList DeserializeServiceResourceList(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new ServiceResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ServiceResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs index b68a170e23ab..37710bc7652f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ServiceResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ServiceResourceList() + /// The ServiceResource items on this page. + /// is null. + internal ServiceResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of service list results if there are any. + /// The ServiceResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ServiceResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ServiceResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ServiceResourceList() + { + } + + /// The ServiceResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of service list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs index abf72db581a0..6bc723f9336a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Represents the health policy used to evaluate the health of services belonging to a service type. - /// - /// + /// Represents the health policy used to evaluate the health of services belonging to a service type. public partial class ServiceTypeHealthPolicy { /// @@ -56,7 +53,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// /// /// The maximum allowed percentage of unhealthy partitions per service. @@ -65,7 +61,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// /// /// The maximum allowed percentage of unhealthy replicas per partition. @@ -74,7 +69,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUnhealthyPartitionsPerService, int maxPercentUnhealthyReplicasPerPartition) { @@ -91,7 +85,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// /// /// The maximum allowed percentage of unhealthy partitions per service. @@ -100,7 +93,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// /// /// The maximum allowed percentage of unhealthy replicas per partition. @@ -109,7 +101,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// /// Keeps track of any properties unknown to the library. internal ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUnhealthyPartitionsPerService, int maxPercentUnhealthyReplicasPerPartition, IDictionary serializedAdditionalRawData) @@ -132,7 +123,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// public int MaxPercentUnhealthyServices { get; set; } /// @@ -142,7 +132,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// public int MaxPercentUnhealthyPartitionsPerService { get; set; } /// @@ -152,7 +141,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// public int MaxPercentUnhealthyReplicasPerPartition { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs new file mode 100644 index 000000000000..b326cec7d4fe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.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.ServiceFabricManagedClusters.Models +{ + /// Sfmc operation status. + public readonly partial struct SfmcOperationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SfmcOperationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string StartedValue = "Started"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string AbortedValue = "Aborted"; + private const string CanceledValue = "Canceled"; + + /// Operation created. + public static SfmcOperationStatus Created { get; } = new SfmcOperationStatus(CreatedValue); + /// Operation started. + public static SfmcOperationStatus Started { get; } = new SfmcOperationStatus(StartedValue); + /// Operation succeeded. + public static SfmcOperationStatus Succeeded { get; } = new SfmcOperationStatus(SucceededValue); + /// Operation failed. + public static SfmcOperationStatus Failed { get; } = new SfmcOperationStatus(FailedValue); + /// Operation aborted. + public static SfmcOperationStatus Aborted { get; } = new SfmcOperationStatus(AbortedValue); + /// Operation canceled. + public static SfmcOperationStatus Canceled { get; } = new SfmcOperationStatus(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(SfmcOperationStatus left, SfmcOperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SfmcOperationStatus left, SfmcOperationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SfmcOperationStatus(string value) => new SfmcOperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SfmcOperationStatus other && Equals(other); + /// + public bool Equals(SfmcOperationStatus 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs index f65db2f707c3..53608354b2b2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// SingletonPartitionScheme. + /// Describes the partition scheme of a singleton-partitioned, or non-partitioned service. public partial class SingletonPartitionScheme : ManagedServicePartitionScheme { /// Initializes a new instance of . @@ -20,7 +20,7 @@ public SingletonPartitionScheme() } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. internal SingletonPartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) : base(partitionScheme, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs index 155996858673..39fc08e6363f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs @@ -54,7 +54,6 @@ public StatefulServiceProperties(string serviceTypeName, ManagedServicePartition /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. /// The target replica set size as a number. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs index 93129f40d5e1..fd3d6be14ccb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs @@ -56,7 +56,6 @@ public StatelessServiceProperties(string serviceTypeName, ManagedServicePartitio /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// The instance count. /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs index 67b928a41677..5bf473d31704 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs @@ -18,12 +18,10 @@ public partial class UniformInt64RangePartitionScheme : ManagedServicePartitionS /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public UniformInt64RangePartitionScheme(int count, long lowKey, long highKey) { @@ -34,18 +32,16 @@ public UniformInt64RangePartitionScheme(int count, long lowKey, long highKey) } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. /// The number of partitions. /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// internal UniformInt64RangePartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData, int count, long lowKey, long highKey) : base(partitionScheme, serializedAdditionalRawData) { @@ -65,13 +61,11 @@ internal UniformInt64RangePartitionScheme() /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public long LowKey { get; set; } /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public long HighKey { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..0a893388e133 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs @@ -0,0 +1,130 @@ +// 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.ServiceFabricManagedClusters.Models +{ + internal partial class UnknownFaultSimulationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(FaultSimulationContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + FaultSimulationContent 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(FaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + + internal static UnknownFaultSimulationContent DeserializeUnknownFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultKind faultKind = "Unknown"; + bool? force = default; + FaultSimulationConstraints constraints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("faultKind"u8)) + { + faultKind = new FaultKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("force"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + force = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = FaultSimulationConstraints.DeserializeFaultSimulationConstraints(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownFaultSimulationContent(faultKind, force, constraints, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContent 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs new file mode 100644 index 000000000000..6c4b3fbef097 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Unknown version of FaultSimulationContent. + internal partial class UnknownFaultSimulationContent : FaultSimulationContent + { + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + internal UnknownFaultSimulationContent(FaultKind faultKind, bool? isForced, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData) : base(faultKind, isForced, constraints, serializedAdditionalRawData) + { + FaultKind = faultKind; + } + + /// Initializes a new instance of for deserialization. + internal UnknownFaultSimulationContent() + { + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs similarity index 96% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs index 78ef62747428..c736bfd5a8a7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - internal partial class UnknownServiceResourceProperties : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownManagedServiceProperties : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -49,7 +49,7 @@ ManagedServiceProperties IJsonModel.Create(ref Utf8Jso return DeserializeManagedServiceProperties(document.RootElement, options); } - internal static UnknownServiceResourceProperties DeserializeUnknownServiceResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownManagedServiceProperties DeserializeUnknownManagedServiceProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -183,7 +183,7 @@ internal static UnknownServiceResourceProperties DeserializeUnknownServiceResour } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownServiceResourceProperties( + return new UnknownManagedServiceProperties( placementConstraints, correlationScheme ?? new ChangeTrackingList(), serviceLoadMetrics ?? new ChangeTrackingList(), diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs similarity index 74% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs index cdab207081e0..db7381e5d678 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs @@ -10,10 +10,10 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ServiceResourceProperties. - internal partial class UnknownServiceResourceProperties : ManagedServiceProperties + /// Unknown version of ManagedServiceProperties. + internal partial class UnknownManagedServiceProperties : ManagedServiceProperties { - /// Initializes a new instance of . + /// Initializes a new instance of . /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". /// A list that describes the correlation of the service with other services. /// The service load metrics is given as an array of ServiceLoadMetric objects. @@ -38,15 +38,14 @@ internal partial class UnknownServiceResourceProperties : ManagedServiceProperti /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// - internal UnknownServiceResourceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData, provisioningState, serviceKind, serviceTypeName, partitionDescription, servicePackageActivationMode, serviceDnsName) + internal UnknownManagedServiceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData, provisioningState, serviceKind, serviceTypeName, partitionDescription, servicePackageActivationMode, serviceDnsName) { ServiceKind = serviceKind; } - /// Initializes a new instance of for deserialization. - internal UnknownServiceResourceProperties() + /// Initializes a new instance of for deserialization. + internal UnknownManagedServiceProperties() { } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs index 9d8e065b17dc..5fb0d7f19647 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs @@ -10,11 +10,11 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of Partition. + /// Unknown version of ManagedServicePartitionScheme. internal partial class UnknownPartition : ManagedServicePartitionScheme { /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. internal UnknownPartition(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) : base(partitionScheme, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs index c3924d9086b9..c21ca4b1c4f7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs @@ -10,11 +10,11 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ScalingMechanism. + /// Unknown version of ManagedServiceScalingMechanism. internal partial class UnknownScalingMechanism : ManagedServiceScalingMechanism { /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal UnknownScalingMechanism(ServiceScalingMechanismKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs index 170529134bd4..90b10208b23a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs @@ -10,11 +10,11 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ScalingTrigger. + /// Unknown version of ManagedServiceScalingTrigger. internal partial class UnknownScalingTrigger : ManagedServiceScalingTrigger { /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal UnknownScalingTrigger(ServiceScalingTriggerKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs index 11a95e1f3b96..8523a2ff53b9 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs @@ -10,15 +10,15 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ServicePlacementPolicy. + /// Unknown version of ManagedServicePlacementPolicy. internal partial class UnknownServicePlacementPolicy : ManagedServicePlacementPolicy { /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. - internal UnknownServicePlacementPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal UnknownServicePlacementPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) { - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs index 14f95717e1d4..1d375b50c5a7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. + /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started. Enter any required information and then click Save. public partial class VmImagePlan { /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs index 8f16c4924940..98c99b5c76fa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Vm extension setup order. - /// - /// + /// Vm extension setup order. public readonly partial struct VmssExtensionSetupOrder : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..bebe86a84e5f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.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; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + public partial class ZoneFaultSimulationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(ZoneFaultSimulationContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ZoneFaultSimulationContent 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(ZoneFaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeZoneFaultSimulationContent(document.RootElement, options); + } + + internal static ZoneFaultSimulationContent DeserializeZoneFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList zones = default; + FaultKind faultKind = default; + bool? force = default; + FaultSimulationConstraints constraints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("faultKind"u8)) + { + faultKind = new FaultKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("force"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + force = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = FaultSimulationConstraints.DeserializeFaultSimulationConstraints(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ZoneFaultSimulationContent(faultKind, force, constraints, serializedAdditionalRawData, zones ?? new ChangeTrackingList()); + } + + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + ZoneFaultSimulationContent 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeZoneFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs new file mode 100644 index 000000000000..64d73ca19086 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Parameters for Zone Fault Simulation action. + public partial class ZoneFaultSimulationContent : FaultSimulationContent + { + /// Initializes a new instance of . + public ZoneFaultSimulationContent() + { + Zones = new ChangeTrackingList(); + FaultKind = FaultKind.Zone; + } + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + /// Indicates the zones of the fault simulation. + internal ZoneFaultSimulationContent(FaultKind faultKind, bool? isForced, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData, IList zones) : base(faultKind, isForced, constraints, serializedAdditionalRawData) + { + Zones = zones; + FaultKind = faultKind; + } + + /// Indicates the zones of the fault simulation. + public IList Zones { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs index 93cabb6d0fa1..4300bba394b2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ApplicationTypeVersionsRestOperations /// Initializes a new instance of ApplicationTypeVersionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationTypeVersionsRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -65,7 +65,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -79,8 +79,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -114,8 +114,8 @@ public async Task> GetA } /// Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -156,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -177,7 +177,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -195,8 +195,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -226,8 +226,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -264,7 +264,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -285,7 +285,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -303,8 +303,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of an application type version resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -338,8 +338,8 @@ public async Task> Upda } /// Updates the tags of an application type version resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -380,7 +380,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -401,7 +401,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -415,8 +415,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -435,7 +435,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -445,8 +444,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -465,7 +464,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -482,7 +480,7 @@ internal RequestUriBuilder CreateListByApplicationTypesRequestUri(string subscri uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -502,7 +500,7 @@ internal HttpMessage CreateListByApplicationTypesRequest(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -515,8 +513,8 @@ internal HttpMessage CreateListByApplicationTypesRequest(string subscriptionId, } /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -546,8 +544,8 @@ public async Task> ListByApplicatio } /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -600,8 +598,8 @@ internal HttpMessage CreateListByApplicationTypesNextPageRequest(string nextLink /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -633,8 +631,8 @@ public async Task> ListByApplicatio /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs index 939894f7a141..c6aeda2e269c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ApplicationTypesRestOperations /// Initializes a new instance of ApplicationTypesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationTypesRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -63,7 +63,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -75,8 +75,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> GetAsync(st } /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -148,7 +148,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -167,7 +167,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -183,8 +183,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type name resource. @@ -216,8 +216,8 @@ public async Task> CreateOrUpd } /// Create or update a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type name resource. @@ -256,7 +256,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -275,7 +275,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -291,8 +291,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of an application type resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type resource updated tags. @@ -324,8 +324,8 @@ public async Task> UpdateAsync } /// Updates the tags of an application type resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The application type resource updated tags. @@ -364,7 +364,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -383,7 +383,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -395,8 +395,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -413,7 +413,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -423,8 +422,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -441,7 +440,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -458,7 +456,7 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes", false); uri.AppendQuery("api-version", _apiVersion, true); @@ -476,7 +474,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes", false); uri.AppendQuery("api-version", _apiVersion, true); @@ -487,8 +485,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -516,8 +514,8 @@ public async Task> ListAsync(string subscr } /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -568,8 +566,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -599,8 +597,8 @@ public async Task> ListNextPageAsync(strin /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs index 255649d6246a..72755491e210 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ApplicationsRestOperations /// Initializes a new instance of ApplicationsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationsRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -48,16 +48,15 @@ internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, st uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -68,7 +67,6 @@ internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string reso uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -76,59 +74,73 @@ internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string reso return message; } - /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// 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 cluster resource. /// The name of the application resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ReadUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// 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 cluster resource. /// The name of the application resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ReadUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -140,16 +152,15 @@ internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -160,33 +171,39 @@ internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string re uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/startRollback", 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; } - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - /// The customer subscription identifier. - /// The name of the resource group. + /// Create or update a Service Fabric managed application resource with the specified name. + /// 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 cluster resource. /// The name of the application resource. + /// The application resource. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task StartRollbackAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -194,25 +211,28 @@ public async Task StartRollbackAsync(string subscriptionId, string res } } - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - /// The customer subscription identifier. - /// The name of the resource group. + /// Create or update a Service Fabric managed application resource with the specified name. + /// 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 cluster resource. /// The name of the application resource. + /// The application resource. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response StartRollback(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -220,7 +240,7 @@ public Response StartRollback(string subscriptionId, string resourceGroupName, s } } - internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -232,16 +252,15 @@ internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -252,75 +271,84 @@ internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string re uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/resumeUpgrade", 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; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - /// The customer subscription identifier. - /// The name of the resource group. + /// Updates the tags of an application resource of a given managed 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 cluster resource. /// The name of the application resource. - /// The parameters for resuming an application upgrade. + /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ResumeUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - /// The customer subscription identifier. - /// The name of the resource group. + /// Updates the tags of an application resource of a given managed 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 cluster resource. /// The name of the application resource. - /// The parameters for resuming an application upgrade. + /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ResumeUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -328,7 +356,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -336,18 +364,18 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -358,73 +386,61 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Delete a Service Fabric managed application resource with the specified name. + /// 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 cluster resource. /// The name of the application 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 clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Delete a Service Fabric managed application resource with the specified name. + /// 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 cluster resource. /// The name of the application 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 clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -432,99 +448,93 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); + uri.AppendPath("/applications", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName) { 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); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); + uri.AppendPath("/applications", 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 Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. + /// 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 cluster resource. - /// The name of the application resource. - /// The application resource. /// 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 clusterName, string applicationName, ServiceFabricManagedApplicationData data, 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, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ApplicationResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create or update a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. + /// 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 cluster resource. - /// The name of the application resource. - /// The application resource. /// 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 clusterName, string applicationName, ServiceFabricManagedApplicationData data, 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, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ApplicationResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) + internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -532,107 +542,91 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) + internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/fetchUpgradeStatus", 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates the tags of an application resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. + /// 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 cluster resource. /// The name of the application resource. - /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) + public async Task ReadUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); + using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates the tags of an application resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. + /// 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 cluster resource. /// The name of the application resource. - /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) + public Response ReadUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); + using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -640,93 +634,99 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/resumeUpgrade", 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; } - /// Delete a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// 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 cluster resource. /// The name of the application resource. + /// The parameters for resuming an application upgrade. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task ResumeUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); 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 Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// 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 cluster resource. /// The name of the application resource. + /// The parameters for resuming an application upgrade. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response ResumeUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); _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 CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -734,27 +734,31 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications", false); + uri.AppendPath("/applications/", false); + uri.AppendPath(applicationName, true); + uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications", false); + uri.AppendPath("/applications/", false); + uri.AppendPath(applicationName, true); + uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -762,59 +766,53 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// 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 cluster resource. + /// The name of the application resource. /// 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 clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartRollbackAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ApplicationResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// 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 cluster resource. + /// The name of the application resource. /// 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 clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StartRollback(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ApplicationResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -844,8 +842,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -875,8 +873,8 @@ public async Task> ListNextPageAsync(string ne /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs index c45acb409fec..dc85f94ae1a5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs @@ -23,14 +23,14 @@ internal partial class ManagedApplyMaintenanceWindowRestOperations /// Initializes a new instance of ManagedApplyMaintenanceWindowRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedApplyMaintenanceWindowRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreatePostRequest(string subscriptionId, string resourceGro } /// Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -95,8 +95,8 @@ public async Task PostAsync(string subscriptionId, string resourceGrou } /// Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs index 0d6bb642c742..7a724c0ffafb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ManagedAzResiliencyStatusRestOperations /// Initializes a new instance of ManagedAzResiliencyStatusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedAzResiliencyStatusRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetManagedAzResiliencyStatusRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetManagedAzResiliencyStatusRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -73,19 +73,19 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + public async Task> GetManagedAzResiliencyStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetManagedAzResiliencyStatusRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -102,19 +102,19 @@ public async Task> GetAsync(string subscript } /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + public Response GetManagedAzResiliencyStatus(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetManagedAzResiliencyStatusRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs index 1f6de46f3826..c424d5d0f699 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs @@ -26,14 +26,14 @@ internal partial class ManagedClusterVersionRestOperations /// Initializes a new instance of ManagedClusterVersionRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedClusterVersionRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,7 +72,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat } /// Gets information about an available Service Fabric managed cluster code version. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cluster code version. /// The cancellation token to use. @@ -100,7 +100,7 @@ public async Task> GetAsync(string } /// Gets information about an available Service Fabric managed cluster code version. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cluster code version. /// The cancellation token to use. @@ -127,7 +127,7 @@ public Response Get(string subscriptionId, A } } - internal RequestUriBuilder CreateGetByEnvironmentRequestUri(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -135,15 +135,12 @@ internal RequestUriBuilder CreateGetByEnvironmentRequestUri(string subscriptionI uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(environment.ToString(), true); - uri.AppendPath("/managedClusterVersions/", false); - uri.AppendPath(clusterVersion, true); + uri.AppendPath("/managedClusterVersions", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) + internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -154,10 +151,7 @@ internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureL uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(environment.ToString(), true); - uri.AppendPath("/managedClusterVersions/", false); - uri.AppendPath(clusterVersion, true); + uri.AppendPath("/managedClusterVersions", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -165,28 +159,30 @@ internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureL return message; } - /// Gets information about an available Service Fabric cluster code version by environment. - /// The customer subscription identifier. + /// Gets all available code versions for Service Fabric cluster resources by location. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. - /// The cluster code version. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetByEnvironmentAsync(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task>> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateGetByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); + using var message = CreateListRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterVersion value = default; + IReadOnlyList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); + } + value = array; return Response.FromValue(value, message.Response); } default: @@ -194,28 +190,30 @@ public async Task> GetByEnvironment } } - /// Gets information about an available Service Fabric cluster code version by environment. - /// The customer subscription identifier. + /// Gets all available code versions for Service Fabric cluster resources by location. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. - /// The cluster code version. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response GetByEnvironment(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response> List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateGetByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); + using var message = CreateListRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterVersion value = default; + IReadOnlyList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); + } + value = array; return Response.FromValue(value, message.Response); } default: @@ -223,7 +221,7 @@ public Response GetByEnvironment(string subs } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedClusterVersionByEnvironmentRequestUri(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -231,12 +229,15 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLoca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedClusterVersions", false); + uri.AppendPath("/environments/", false); + uri.AppendPath(environment.ToString(), true); + uri.AppendPath("/managedClusterVersions/", false); + uri.AppendPath(clusterVersion, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedClusterVersionByEnvironmentRequest(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -247,7 +248,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedClusterVersions", false); + uri.AppendPath("/environments/", false); + uri.AppendPath(environment.ToString(), true); + uri.AppendPath("/managedClusterVersions/", false); + uri.AppendPath(clusterVersion, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -255,30 +259,28 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca return message; } - /// Gets all available code versions for Service Fabric cluster resources by location. - /// The customer subscription identifier. + /// Gets information about an available Service Fabric cluster code version by environment. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetManagedClusterVersionByEnvironmentAsync(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedClusterVersionByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - IReadOnlyList value = default; + ServiceFabricManagedClusterVersion value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); - } - value = array; + value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -286,30 +288,28 @@ public async Task>> L } } - /// Gets all available code versions for Service Fabric cluster resources by location. - /// The customer subscription identifier. + /// Gets information about an available Service Fabric cluster code version by environment. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetManagedClusterVersionByEnvironment(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedClusterVersionByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - IReadOnlyList value = default; + ServiceFabricManagedClusterVersion value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); - } - value = array; + value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -354,9 +354,9 @@ internal HttpMessage CreateListByEnvironmentRequest(string subscriptionId, Azure } /// Gets all available code versions for Service Fabric cluster resources by environment. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -386,9 +386,9 @@ public async Task>> L } /// Gets all available code versions for Service Fabric cluster resources by environment. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs index 2b4e2d0f01f7..5260fa9abd15 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs @@ -25,17 +25,389 @@ internal partial class ManagedClustersRestOperations /// Initializes a new instance of ManagedClustersRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedClustersRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified 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 name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified 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 name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, 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 Service Fabric managed cluster resource with the specified name. + /// 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 cluster resource. + /// The cluster resource. + /// 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 clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a Service Fabric managed cluster resource with the specified name. + /// 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 cluster resource. + /// The cluster resource. + /// 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 clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, 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 the tags of of a Service Fabric managed cluster resource with the specified name. + /// 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 cluster resource. + /// The managed cluster resource updated tags. + /// 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 clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the tags of of a Service Fabric managed cluster resource with the specified name. + /// 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 cluster resource. + /// The managed cluster resource updated tags. + /// 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 clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Service Fabric managed cluster resource with the specified name. + /// 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 cluster resource. + /// 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 clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + 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 Service Fabric managed cluster resource with the specified name. + /// 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 cluster resource. + /// 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 clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); @@ -69,8 +441,8 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - /// The customer subscription identifier. - /// The name of the 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. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -96,8 +468,8 @@ public async Task> ListByResourceGroupAsync(s } /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - /// The customer subscription identifier. - /// The name of the 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. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -151,7 +523,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -176,7 +548,7 @@ public async Task> ListBySubscriptionAsync(st } /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -200,7 +572,7 @@ public Response ListBySubscription(string subscription } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -210,15 +582,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -227,76 +600,81 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/getFaultSimulation", 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; } - /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// 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 cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public async Task> GetFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterData value = default; + FaultSimulation value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// 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 cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public Response GetFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterData value = default; + FaultSimulation value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data) + internal RequestUriBuilder CreateListFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -306,15 +684,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data) + internal HttpMessage CreateListFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -323,72 +702,73 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/listFaultSimulation", 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 Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the 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 cluster resource. - /// The cluster resource. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + public async Task> ListFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create or update a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the 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 cluster resource. - /// The cluster resource. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + public Response ListFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + internal RequestUriBuilder CreateStartFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -398,15 +778,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/startFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + internal HttpMessage CreateStartFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -415,80 +796,71 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/startFaultSimulation", 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(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(faultSimulationContentWrapper, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; } - /// Update the tags of of a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the 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 cluster resource. - /// The managed cluster resource updated tags. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + public async Task StartFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, faultSimulationContentWrapper); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedClusterData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Update the tags of of a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the 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 cluster resource. - /// The managed cluster resource updated tags. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + public Response StartFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, faultSimulationContentWrapper); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedClusterData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateStopFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -498,15 +870,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateStopFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -515,59 +888,64 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/stopFaultSimulation", 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; } - /// Delete a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the 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 cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public async Task StopFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); 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 Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the 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 cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public Response StopFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -598,8 +976,8 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -627,8 +1005,8 @@ public async Task> ListByResourceGroupNextPag /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -678,7 +1056,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -705,7 +1083,7 @@ public async Task> ListBySubscriptionNextPage /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -729,5 +1107,89 @@ public Response ListBySubscriptionNextPage(string next throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListFaultSimulationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListFaultSimulationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) + { + 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; + } + + /// Gets the list of recent fault simulations for the cluster. + /// 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 cluster resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListFaultSimulationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recent fault simulations for the cluster. + /// 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 cluster resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListFaultSimulationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs index c63da012f10e..da9210d94c46 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ManagedMaintenanceWindowStatusRestOperations /// Initializes a new instance of ManagedMaintenanceWindowStatusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedMaintenanceWindowStatusRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> GetAsync(string subs } /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs index 93113c271520..cea0181cc723 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ManagedUnsupportedVMSizesRestOperations /// Initializes a new instance of ManagedUnsupportedVMSizesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedUnsupportedVMSizesRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizeRequestUri(string subscriptionId, AzureLocation location, string vmSize) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,12 +44,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLoca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes", false); + uri.AppendPath("/managedUnsupportedVMSizes/", false); + uri.AppendPath(vmSize, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedUnsupportedVmSizeRequest(string subscriptionId, AzureLocation location, string vmSize) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -60,7 +61,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes", false); + uri.AppendPath("/managedUnsupportedVMSizes/", false); + uri.AppendPath(vmSize, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -68,25 +70,27 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca return message; } - /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetManagedUnsupportedVmSizeAsync(string subscriptionId, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizeRequest(subscriptionId, location, vmSize); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedVmSizesResult value = default; + ServiceFabricManagedUnsupportedVmSize value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); + value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -94,25 +98,27 @@ public async Task> ListAsync(string subscriptionI } } - /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetManagedUnsupportedVmSize(string subscriptionId, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizeRequest(subscriptionId, location, vmSize); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedVmSizesResult value = default; + ServiceFabricManagedUnsupportedVmSize value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); + value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -120,7 +126,7 @@ public Response List(string subscriptionId, AzureLocation } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string vmSize) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizesRequestUri(string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -128,13 +134,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes/", false); - uri.AppendPath(vmSize, true); + uri.AppendPath("/managedUnsupportedVMSizes", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string vmSize) + internal HttpMessage CreateGetManagedUnsupportedVmSizesRequest(string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -145,8 +150,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes/", false); - uri.AppendPath(vmSize, true); + uri.AppendPath("/managedUnsupportedVMSizes", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,27 +158,25 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat return message; } - /// Get unsupported vm size for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// 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, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetManagedUnsupportedVmSizesAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateGetRequest(subscriptionId, location, vmSize); + using var message = CreateGetManagedUnsupportedVmSizesRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedUnsupportedVmSize value = default; + ManagedVmSizesResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); + value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -182,27 +184,25 @@ public async Task> GetAsync(stri } } - /// Get unsupported vm size for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// 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, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response GetManagedUnsupportedVmSizes(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateGetRequest(subscriptionId, location, vmSize); + using var message = CreateGetManagedUnsupportedVmSizesRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedUnsupportedVmSize value = default; + ManagedVmSizesResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); + value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -210,7 +210,7 @@ public Response Get(string subscriptionId } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizesNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -218,7 +218,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedUnsupportedVmSizesNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -234,17 +234,17 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// 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, AzureLocation location, CancellationToken cancellationToken = default) + public async Task> GetManagedUnsupportedVmSizesNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -262,17 +262,17 @@ public async Task> ListNextPageAsync(string nextL /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// 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, AzureLocation location, CancellationToken cancellationToken = default) + public Response GetManagedUnsupportedVmSizesNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs index 1b2c284ea8e5..7776f44c54d1 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs @@ -25,18 +25,18 @@ internal partial class NodeTypeSkusRestOperations /// Initializes a new instance of NodeTypeSkusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public NodeTypeSkusRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateGetAvailableSkusRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -53,7 +53,7 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateGetAvailableSkusRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -77,21 +77,21 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get a Service Fabric node type supported SKUs. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the node type. /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> GetAvailableSkusAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -108,21 +108,21 @@ public async Task> ListAsync(string subscription } /// Get a Service Fabric node type supported SKUs. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the node type. /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response GetAvailableSkus(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -138,7 +138,7 @@ public Response List(string subscriptionId, string resour } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateGetAvailableSkusNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,7 +146,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateGetAvailableSkusNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -162,14 +162,14 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get a Service Fabric node type supported SKUs. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the node type. /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> GetAvailableSkusNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -177,7 +177,7 @@ public async Task> ListNextPageAsync(string next Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -195,14 +195,14 @@ public async Task> ListNextPageAsync(string next /// Get a Service Fabric node type supported SKUs. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the node type. /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response GetAvailableSkusNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -210,7 +210,7 @@ public Response ListNextPage(string nextLink, string subs Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs index dd4e1bb607d6..49e9cf63bc16 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class NodeTypesRestOperations /// Initializes a new instance of NodeTypesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public NodeTypesRestOperations(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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/nodeTypes", false); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/nodeTypes", false); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, s return message; } - /// Gets all Node types of the specified managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric node type of a given managed 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 cluster resource. + /// The name of the node type. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByManagedClustersAsync(string subscriptionId, string resourceGroupName, string clusterName, 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - NodeTypeListResult value = default; + ServiceFabricManagedNodeTypeData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets all Node types of the specified managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric node type of a given managed 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 cluster resource. + /// The name of the node type. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByManagedClusters(string subscriptionId, string resourceGroupName, string clusterName, 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - NodeTypeListResult value = default; + ServiceFabricManagedNodeTypeData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -142,16 +152,15 @@ internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRestartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -162,7 +171,694 @@ internal HttpMessage CreateRestartRequest(string subscriptionId, string resource uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/restart", 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 Service Fabric node type of a given managed 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 cluster resource. + /// The name of the node type. + /// The node type resource. + /// 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 clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a Service Fabric node type of a given managed 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 cluster resource. + /// The name of the node type. + /// The node type resource. + /// 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 clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, 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 the configuration of a node type of a given managed cluster, only updating tags. + /// 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 cluster resource. + /// The name of the node type. + /// The parameters to update the node type configuration. + /// 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 clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, 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 the configuration of a node type of a given managed cluster, only updating tags. + /// 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 cluster resource. + /// The name of the node type. + /// The parameters to update the node type configuration. + /// 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 clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, 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 subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Service Fabric node type of a given managed 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 cluster resource. + /// The name of the node type. + /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + 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 Service Fabric node type of a given managed 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 cluster resource. + /// The name of the node type. + /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Node types of the specified managed 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 cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByManagedClustersAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NodeTypeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Node types of the specified managed 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 cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByManagedClusters(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NodeTypeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeallocateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deallocate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeallocateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deallocate", 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; + } + + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the 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 cluster resource. + /// The name of the node type. + /// parameters for deallocate action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeallocateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the 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 cluster resource. + /// The name of the node type. + /// parameters for deallocate action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Deallocate(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deleteNode", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deleteNode", 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; + } + + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the 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 cluster resource. + /// The name of the node type. + /// parameters for delete action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteNodeAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the 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 cluster resource. + /// The name of the node type. + /// parameters for delete action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteNode(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRedeployRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/redeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/redeploy", 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; + } + + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// 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 cluster resource. + /// The name of the node type. + /// parameters for redeploy action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RedeployAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// 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 cluster resource. + /// The name of the node type. + /// parameters for redeploy action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Redeploy(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/reimage", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateReimageRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/reimage", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -174,16 +870,16 @@ internal HttpMessage CreateRestartRequest(string subscriptionId, string resource return message; } - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. + /// 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 cluster resource. /// The name of the node type. - /// parameters for restart action. + /// parameters for reimage action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task RestartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task ReimageAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -191,11 +887,10 @@ public async Task RestartAsync(string subscriptionId, string resourceG Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -203,16 +898,16 @@ public async Task RestartAsync(string subscriptionId, string resourceG } } - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. + /// 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 cluster resource. /// The name of the node type. - /// parameters for restart action. + /// parameters for reimage action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Restart(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Reimage(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -220,11 +915,10 @@ public Response Restart(string subscriptionId, string resourceGroupName, string Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -232,7 +926,7 @@ public Response Restart(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -244,12 +938,12 @@ internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/reimage", false); + uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateReimageRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateRestartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -264,7 +958,7 @@ internal HttpMessage CreateReimageRequest(string subscriptionId, string resource uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/reimage", false); + uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -276,16 +970,16 @@ internal HttpMessage CreateReimageRequest(string subscriptionId, string resource return message; } - /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// 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 cluster resource. /// The name of the node type. - /// parameters for reimage action. + /// parameters for restart action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ReimageAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task RestartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -293,11 +987,10 @@ public async Task ReimageAsync(string subscriptionId, string resourceG Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -305,16 +998,16 @@ public async Task ReimageAsync(string subscriptionId, string resourceG } } - /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// 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 cluster resource. /// The name of the node type. - /// parameters for reimage action. + /// parameters for restart action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Reimage(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Restart(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -322,11 +1015,10 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -334,7 +1026,7 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,12 +1038,12 @@ internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, str uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/deleteNode", false); + uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -366,7 +1058,7 @@ internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resou uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/deleteNode", false); + uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -378,16 +1070,16 @@ internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resou return message; } - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// 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 cluster resource. /// The name of the node type. - /// parameters for delete action. + /// parameters for start action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteNodeAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task StartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -395,11 +1087,10 @@ public async Task DeleteNodeAsync(string subscriptionId, string resour Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateStartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -407,16 +1098,16 @@ public async Task DeleteNodeAsync(string subscriptionId, string resour } } - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// 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 cluster resource. /// The name of the node type. - /// parameters for delete action. + /// parameters for start action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteNode(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Start(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -424,11 +1115,10 @@ public Response DeleteNode(string subscriptionId, string resourceGroupName, stri Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateStartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -436,7 +1126,7 @@ public Response DeleteNode(string subscriptionId, string resourceGroupName, stri } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateStartFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -448,15 +1138,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/startFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateStartFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -467,80 +1158,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/startFaultSimulation", 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(faultSimulationContentWrapper, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Get a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the node type. + /// 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 cluster resource. /// The name of the node type. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task StartFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, faultSimulationContentWrapper); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedNodeTypeData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the node type. + /// 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 cluster resource. /// The name of the node type. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response StartFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, faultSimulationContentWrapper); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedNodeTypeData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) + internal RequestUriBuilder CreateStopFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -552,15 +1238,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) + internal HttpMessage CreateStopFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -571,39 +1258,39 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/stopFaultSimulation", 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Create or update a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the node type. + /// 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 cluster resource. /// The name of the node type. - /// The node type resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + public async Task StopFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -611,28 +1298,27 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the node type. + /// 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 cluster resource. /// The name of the node type. - /// The node type resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + public Response StopFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -640,7 +1326,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + internal RequestUriBuilder CreateGetFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -652,15 +1338,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -671,76 +1358,85 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/getFaultSimulation", 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Update the configuration of a node type of a given managed cluster, only updating tags. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// 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 cluster resource. /// The name of the node type. - /// The parameters to update the node type configuration. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + public async Task> GetFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Update the configuration of a node type of a given managed cluster, only updating tags. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// 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 cluster resource. /// The name of the node type. - /// The parameters to update the node type configuration. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + public Response GetFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateListFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -752,15 +1448,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateListFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -771,6 +1468,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -778,57 +1476,63 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the node type. + /// 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 cluster resource. /// The name of the node type. /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> ListFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the node type. + /// 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 cluster resource. /// The name of the node type. /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response ListFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -858,8 +1562,8 @@ internal HttpMessage CreateListByManagedClustersNextPageRequest(string nextLink, /// Gets all Node types of the specified managed cluster. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -889,8 +1593,8 @@ public async Task> ListByManagedClustersNextPageAsy /// Gets all Node types of the specified managed cluster. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -917,5 +1621,93 @@ public Response ListByManagedClustersNextPage(string nextLin throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListFaultSimulationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListFaultSimulationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + 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; + } + + /// Gets the list of recent fault simulations for the node type. + /// 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 cluster resource. + /// The name of the node type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListFaultSimulationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recent fault simulations for the node type. + /// 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 cluster resource. + /// The name of the node type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListFaultSimulationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs index 24d70faa8dc8..8e07e995b535 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ServicesRestOperations /// 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. - /// server parameter. - /// Api Version. + /// 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-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -65,7 +65,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -79,8 +79,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -114,8 +114,8 @@ public async Task> GetAsync(string sub } /// Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -156,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -177,7 +177,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -195,8 +195,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -226,8 +226,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -264,7 +264,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -285,7 +285,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -303,8 +303,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of a service resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -338,8 +338,8 @@ public async Task> UpdateAsync(string } /// Updates the tags of a service resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -380,7 +380,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -401,7 +401,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -415,8 +415,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -435,7 +435,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -445,8 +444,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -465,7 +464,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -482,7 +480,7 @@ internal RequestUriBuilder CreateListByApplicationsRequestUri(string subscriptio uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -502,7 +500,7 @@ internal HttpMessage CreateListByApplicationsRequest(string subscriptionId, stri uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -515,8 +513,8 @@ internal HttpMessage CreateListByApplicationsRequest(string subscriptionId, stri } /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -546,8 +544,8 @@ public async Task> ListByApplicationsAsync(string } /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -600,8 +598,8 @@ internal HttpMessage CreateListByApplicationsNextPageRequest(string nextLink, st /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -633,8 +631,8 @@ public async Task> ListByApplicationsNextPageAsync /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the 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 name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs index 059dab1723da..37f00cc1b983 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_CreateOrUpdate + /// ApplicationResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_CreateOrUpdate + /// ApplicationResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation CreateOrUpd /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task> Get /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(string appl /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications /// /// /// Operation Id - /// Applications_List + /// ApplicationResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications /// /// /// Operation Id - /// Applications_List + /// ApplicationResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetAll(Cancella /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string applicationName, Ca /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string applicationName, CancellationToken c /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs index fecb0c1cc29f..b99e979f4cc9 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs @@ -44,6 +44,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ManagedIdentities)) + { + writer.WritePropertyName("managedIdentities"u8); + writer.WriteStartArray(); + foreach (var item in ManagedIdentities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -70,16 +80,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("upgradePolicy"u8); writer.WriteObjectValue(UpgradePolicy, options); } - if (Optional.IsCollectionDefined(ManagedIdentities)) - { - writer.WritePropertyName("managedIdentities"u8); - writer.WriteStartArray(); - foreach (var item in ManagedIdentities) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } writer.WriteEndObject(); } @@ -110,11 +110,11 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana string name = default; ResourceType type = default; SystemData systemData = default; + IList managedIdentities = default; string provisioningState = default; string version = default; IDictionary parameters = default; ApplicationUpgradePolicy upgradePolicy = default; - IList managedIdentities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -180,6 +180,20 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("managedIdentities"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ApplicationUserAssignedIdentityInfo.DeserializeApplicationUserAssignedIdentityInfo(item, options)); + } + managedIdentities = array; + continue; + } if (property0.NameEquals("provisioningState"u8)) { provisioningState = property0.Value.GetString(); @@ -213,20 +227,6 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana upgradePolicy = ApplicationUpgradePolicy.DeserializeApplicationUpgradePolicy(property0.Value, options); continue; } - if (property0.NameEquals("managedIdentities"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ApplicationUserAssignedIdentityInfo.DeserializeApplicationUserAssignedIdentityInfo(item, options)); - } - managedIdentities = array; - continue; - } } continue; } @@ -243,12 +243,12 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, + managedIdentities ?? new ChangeTrackingList(), provisioningState, version, parameters ?? new ChangeTrackingDictionary(), upgradePolicy, - managedIdentities ?? new ChangeTrackingList(), + identity, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs index 2a875e2e4af5..f88bd936d798 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs @@ -55,8 +55,8 @@ public partial class ServiceFabricManagedApplicationData : TrackedResourceData /// The location. public ServiceFabricManagedApplicationData(AzureLocation location) : base(location) { - Parameters = new ChangeTrackingDictionary(); ManagedIdentities = new ChangeTrackingList(); + Parameters = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -66,25 +66,24 @@ public ServiceFabricManagedApplicationData(AzureLocation location) : base(locati /// The systemData. /// The tags. /// The location. - /// Describes the managed identities for an Azure resource. + /// List of user assigned identities for the application, each mapped to a friendly name. /// The current deployment or provisioning state, which only appears in the response. /// /// The version of the application type as defined in the application manifest. /// This name must be the full Arm Resource ID for the referenced application type version. - /// /// /// List of application parameters with overridden values from their default values specified in the application manifest. /// Describes the policy for a monitored application upgrade. - /// List of user assigned identities for the application, each mapped to a friendly name. + /// Describes the managed identities for an Azure resource. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedApplicationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, string version, IDictionary parameters, ApplicationUpgradePolicy upgradePolicy, IList managedIdentities, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ServiceFabricManagedApplicationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList managedIdentities, string provisioningState, string version, IDictionary parameters, ApplicationUpgradePolicy upgradePolicy, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; + ManagedIdentities = managedIdentities; ProvisioningState = provisioningState; Version = version; Parameters = parameters; UpgradePolicy = upgradePolicy; - ManagedIdentities = managedIdentities; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -93,21 +92,20 @@ internal ServiceFabricManagedApplicationData() { } - /// Describes the managed identities for an Azure resource. - public ManagedServiceIdentity Identity { get; set; } + /// List of user assigned identities for the application, each mapped to a friendly name. + public IList ManagedIdentities { get; } /// The current deployment or provisioning state, which only appears in the response. public string ProvisioningState { get; } /// /// The version of the application type as defined in the application manifest. /// This name must be the full Arm Resource ID for the referenced application type version. - /// /// public string Version { get; set; } /// List of application parameters with overridden values from their default values specified in the application manifest. public IDictionary Parameters { get; } /// Describes the policy for a monitored application upgrade. public ApplicationUpgradePolicy UpgradePolicy { get; set; } - /// List of user assigned identities for the application, each mapped to a friendly name. - public IList ManagedIdentities { get; } + /// Describes the managed identities for an Azure resource. + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs index c0e1f5dbfcb6..660dd857eb45 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs @@ -31,7 +31,7 @@ public partial class ServiceFabricManagedApplicationResource : ArmResource /// The applicationName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}"; return new ResourceIdentifier(resourceId); } @@ -40,7 +40,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applications"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applications"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationResource() @@ -102,15 +102,15 @@ public virtual ServiceFabricManagedServiceCollection GetServiceFabricManagedServ /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -133,15 +133,15 @@ public virtual async Task> GetServ /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -164,15 +164,15 @@ public virtual Response GetServiceFabricMan /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,15 +204,15 @@ public virtual async Task> Get /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(Cancellatio /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Delete + /// ApplicationResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -286,15 +286,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Delete + /// ApplicationResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -328,15 +328,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Update + /// ApplicationResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -370,15 +370,15 @@ public virtual async Task> Upd /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Update + /// ApplicationResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(ServiceF /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task ReadUpgradeAsync(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -492,19 +492,19 @@ public virtual ArmOperation ReadUpgrade(WaitUntil waitUntil, CancellationToken c } /// - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade /// /// /// Operation Id - /// Applications_StartRollback + /// Applications_ResumeUpgrade /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -513,15 +513,19 @@ public virtual ArmOperation ReadUpgrade(WaitUntil waitUntil, CancellationToken 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 parameters for resuming an application upgrade. /// The cancellation token to use. - public virtual async Task StartRollbackAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); scope.Start(); try { - var response = await _serviceFabricManagedApplicationApplicationsRestClient.StartRollbackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -534,19 +538,19 @@ public virtual async Task StartRollbackAsync(WaitUntil waitUntil, } /// - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade /// /// /// Operation Id - /// Applications_StartRollback + /// Applications_ResumeUpgrade /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -555,15 +559,19 @@ public virtual async Task StartRollbackAsync(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 parameters for resuming an application upgrade. /// The cancellation token to use. - public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); scope.Start(); try { - var response = _serviceFabricManagedApplicationApplicationsRestClient.StartRollback(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -576,19 +584,19 @@ public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken } /// - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback /// /// /// Operation Id - /// Applications_ResumeUpgrade + /// Applications_StartRollback /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -597,19 +605,15 @@ public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken /// /// /// 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 parameters for resuming an application upgrade. /// The cancellation token to use. - /// is null. - public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public virtual async Task StartRollbackAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); scope.Start(); try { - var response = await _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedApplicationApplicationsRestClient.StartRollbackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -622,19 +626,19 @@ public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, } /// - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback /// /// /// Operation Id - /// Applications_ResumeUpgrade + /// Applications_StartRollback /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -643,19 +647,15 @@ public virtual async Task ResumeUpgradeAsync(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 parameters for resuming an application upgrade. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); scope.Start(); try { - var response = _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedApplicationApplicationsRestClient.StartRollback(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -672,15 +672,15 @@ public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeAppl /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -734,15 +734,15 @@ public virtual async Task> Add /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -796,15 +796,15 @@ public virtual Response AddTag(string k /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -853,15 +853,15 @@ public virtual async Task> Set /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -910,15 +910,15 @@ public virtual Response SetTags(IDictio /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -970,15 +970,15 @@ public virtual async Task> Rem /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs index 0e58fb49da28..73d37518ceb5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_CreateOrUpdate + /// ApplicationTypeResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -107,15 +107,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_CreateOrUpdate + /// ApplicationTypeResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -158,15 +158,15 @@ public virtual ArmOperation CreateO /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -203,15 +203,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -248,15 +248,15 @@ public virtual Response Get(string /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes /// /// /// Operation Id - /// ApplicationTypes_List + /// ApplicationTypeResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -278,15 +278,15 @@ public virtual AsyncPageable GetAll /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes /// /// /// Operation Id - /// ApplicationTypes_List + /// ApplicationTypeResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -308,15 +308,15 @@ public virtual Pageable GetAll(Canc /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -351,15 +351,15 @@ public virtual async Task> ExistsAsync(string applicationTypeName /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -394,15 +394,15 @@ public virtual Response Exists(string applicationTypeName, CancellationTok /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -439,15 +439,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs index 5ce658a99c6b..40d605a876eb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs @@ -31,7 +31,7 @@ public partial class ServiceFabricManagedApplicationTypeResource : ArmResource /// The applicationTypeName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationTypeName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}"; return new ResourceIdentifier(resourceId); } @@ -40,7 +40,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationTypeData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applicationTypes"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applicationTypes"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationTypeResource() @@ -102,15 +102,15 @@ public virtual ServiceFabricManagedApplicationTypeVersionCollection GetServiceFa /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -133,15 +133,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -164,15 +164,15 @@ public virtual Response GetS /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,15 +204,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Delete + /// ApplicationTypeResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -286,15 +286,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Delete + /// ApplicationTypeResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -328,15 +328,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Update + /// ApplicationTypeResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -370,15 +370,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Update + /// ApplicationTypeResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -412,15 +412,15 @@ public virtual Response Update(Serv /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -474,15 +474,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -536,15 +536,15 @@ public virtual Response AddTag(stri /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -593,15 +593,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -650,15 +650,15 @@ public virtual Response SetTags(IDi /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -710,15 +710,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs index 62d8d8ef5c70..a3a494f8d3a3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_CreateOrUpdate + /// ApplicationTypeVersionResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_CreateOrUpdate + /// ApplicationTypeVersionResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions /// /// /// Operation Id - /// ApplicationTypeVersions_ListByApplicationTypes + /// ApplicationTypeVersionResource_ListByApplicationTypes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions /// /// /// Operation Id - /// ApplicationTypeVersions_ListByApplicationTypes + /// ApplicationTypeVersionResource_ListByApplicationTypes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs index 1aa2bfc2e67b..6e62d07ed77a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs @@ -32,7 +32,7 @@ public partial class ServiceFabricManagedApplicationTypeVersionResource : ArmRes /// The version. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationTypeName, string version) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}"; return new ResourceIdentifier(resourceId); } @@ -41,7 +41,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationTypeVersionData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applicationTypes/versions"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationTypeVersionResource() @@ -96,15 +96,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -136,15 +136,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -176,15 +176,15 @@ public virtual Response Get( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Delete + /// ApplicationTypeVersionResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -218,15 +218,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Delete + /// ApplicationTypeVersionResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -260,15 +260,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Update + /// ApplicationTypeVersionResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -302,15 +302,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Update + /// ApplicationTypeVersionResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -344,15 +344,15 @@ public virtual Response Upda /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -406,15 +406,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -468,15 +468,15 @@ public virtual Response AddT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -525,15 +525,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -582,15 +582,15 @@ public virtual Response SetT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -642,15 +642,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs index 6df765faf4f4..de543cc4096c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// ManagedClusters_CreateOrUpdate + /// ManagedCluster_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -110,11 +110,11 @@ public virtual async Task> Cre /// /// /// Operation Id - /// ManagedClusters_CreateOrUpdate + /// ManagedCluster_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -159,11 +159,11 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,11 +204,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -249,11 +249,11 @@ public virtual Response Get(string clusterN /// /// /// Operation Id - /// ManagedClusters_ListByResourceGroup + /// ManagedCluster_ListByResourceGroup /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -279,11 +279,11 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Operation Id - /// ManagedClusters_ListByResourceGroup + /// ManagedCluster_ListByResourceGroup /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -309,11 +309,11 @@ public virtual Pageable GetAll(Cancellation /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -352,11 +352,11 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -395,11 +395,11 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -440,11 +440,11 @@ public virtual async Task> /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs index acf7a23ab26b..206cdf01c2e6 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs @@ -38,13 +38,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DnsName)) @@ -309,6 +309,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("allocatedOutboundPorts"u8); writer.WriteNumberValue(AllocatedOutboundPorts.Value); } + if (Optional.IsDefined(VmImage)) + { + writer.WritePropertyName("VMImage"u8); + writer.WriteStringValue(VmImage); + } writer.WriteEndObject(); } @@ -332,8 +337,8 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC { return null; } - ServiceFabricManagedClustersSku sku = default; ETag? etag = default; + ServiceFabricManagedClustersSku sku = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -381,15 +386,11 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC bool? enableHttpGatewayExclusiveAuthMode = default; AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; int? allocatedOutboundPorts = default; + string vmImage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sku"u8)) - { - sku = ServiceFabricManagedClustersSku.DeserializeServiceFabricManagedClustersSku(property.Value, options); - continue; - } if (property.NameEquals("etag"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -399,6 +400,11 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC etag = new ETag(property.Value.GetString()); continue; } + if (property.NameEquals("sku"u8)) + { + sku = ServiceFabricManagedClustersSku.DeserializeServiceFabricManagedClustersSku(property.Value, options); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -778,7 +784,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("publicIPPrefixId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -787,7 +793,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("publicIPv6PrefixId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -796,7 +802,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("ddosProtectionPlanId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -848,6 +854,11 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC allocatedOutboundPorts = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("VMImage"u8)) + { + vmImage = property0.Value.GetString(); + continue; + } } continue; } @@ -864,7 +875,6 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC systemData, tags ?? new ChangeTrackingDictionary(), location, - sku, dnsName, fqdn, ipv4Address, @@ -906,7 +916,9 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC enableHttpGatewayExclusiveAuthMode, autoGeneratedDomainNameLabelScope, allocatedOutboundPorts, + vmImage, etag, + sku, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs index 090cde8c1615..54c3fea59cda 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters /// /// A class representing the ServiceFabricManagedCluster data model. /// The managed cluster resource - /// /// public partial class ServiceFabricManagedClusterData : TrackedResourceData { @@ -61,7 +60,6 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana { Argument.AssertNotNull(sku, nameof(sku)); - Sku = sku; ClusterCertificateThumbprints = new ChangeTrackingList(); LoadBalancingRules = new ChangeTrackingList(); NetworkSecurityRules = new ChangeTrackingList(); @@ -71,6 +69,7 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana IPTags = new ChangeTrackingList(); AuxiliarySubnets = new ChangeTrackingList(); ServiceEndpoints = new ChangeTrackingList(); + Sku = sku; } /// Initializes a new instance of . @@ -80,7 +79,6 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// The systemData. /// The tags. /// The location. - /// The sku of the managed cluster. /// The cluster dns name. /// The fully qualified domain name associated with the public load balancer of the cluster. /// The IPv4 address associated with the public load balancer of the cluster. @@ -99,10 +97,7 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// The list of custom fabric settings to configure the cluster. /// The provisioning state of the managed cluster resource. /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. /// List of add-on features to enable on the cluster. /// Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. @@ -125,11 +120,12 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. /// This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. - /// Azure resource etag. + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + /// 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 sku of the managed cluster. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ServiceFabricManagedClustersSku sku, string dnsName, string fqdn, IPAddress ipv4Address, Guid? clusterId, ServiceFabricManagedClusterState? clusterState, IReadOnlyList clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IList loadBalancingRules, bool? isRdpAccessAllowed, IList networkSecurityRules, IList clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IList fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IList addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy, bool? isIPv6Enabled, string subnetId, IList ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IList auxiliarySubnets, IList serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, int? allocatedOutboundPorts, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string dnsName, string fqdn, IPAddress ipv4Address, Guid? clusterId, ServiceFabricManagedClusterState? clusterState, IReadOnlyList clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IList loadBalancingRules, bool? isRdpAccessAllowed, IList networkSecurityRules, IList clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IList fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IList addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy, bool? isIPv6Enabled, string subnetId, IList ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IList auxiliarySubnets, IList serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, int? allocatedOutboundPorts, string vmImage, ETag? etag, ServiceFabricManagedClustersSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Sku = sku; DnsName = dnsName; Fqdn = fqdn; IPv4Address = ipv4Address; @@ -171,7 +167,9 @@ internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, Res IsHttpGatewayExclusiveAuthModeEnabled = isHttpGatewayExclusiveAuthModeEnabled; AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; AllocatedOutboundPorts = allocatedOutboundPorts; + VmImage = vmImage; ETag = etag; + Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -180,18 +178,6 @@ internal ServiceFabricManagedClusterData() { } - /// The sku of the managed cluster. - internal ServiceFabricManagedClustersSku Sku { get; set; } - /// Sku Name. - public ServiceFabricManagedClustersSkuName? SkuName - { - get => Sku is null ? default(ServiceFabricManagedClustersSkuName?) : Sku.Name; - set - { - Sku = value.HasValue ? new ServiceFabricManagedClustersSku(value.Value) : null; - } - } - /// The cluster dns name. public string DnsName { get; set; } /// The fully qualified domain name associated with the public load balancer of the cluster. @@ -257,10 +243,7 @@ public ServiceFabricManagedClustersSkuName? SkuName public ServiceFabricManagedResourceProvisioningState? ProvisioningState { get; } /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. public string ClusterCodeVersion { get; set; } - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. public ManagedClusterUpgradeMode? ClusterUpgradeMode { get; set; } /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. public ManagedClusterUpgradeCadence? ClusterUpgradeCadence { get; set; } @@ -316,7 +299,20 @@ public int? MaxUnusedVersionsToKeep public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. public int? AllocatedOutboundPorts { get; set; } - /// Azure resource etag. + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + public string VmImage { get; set; } + /// 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 sku of the managed cluster. + internal ServiceFabricManagedClustersSku Sku { get; set; } + /// Sku Name. + public ServiceFabricManagedClustersSkuName? SkuName + { + get => Sku is null ? default(ServiceFabricManagedClustersSkuName?) : Sku.Name; + set + { + Sku = value.HasValue ? new ServiceFabricManagedClustersSku(value.Value) : null; + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs index 6feca7d956ef..4b51515864da 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs @@ -10,6 +10,7 @@ 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; @@ -39,10 +40,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; private readonly ClientDiagnostics _managedAzResiliencyStatusClientDiagnostics; private readonly ManagedAzResiliencyStatusRestOperations _managedAzResiliencyStatusRestClient; - private readonly ClientDiagnostics _managedMaintenanceWindowStatusClientDiagnostics; - private readonly ManagedMaintenanceWindowStatusRestOperations _managedMaintenanceWindowStatusRestClient; private readonly ClientDiagnostics _managedApplyMaintenanceWindowClientDiagnostics; private readonly ManagedApplyMaintenanceWindowRestOperations _managedApplyMaintenanceWindowRestClient; + private readonly ClientDiagnostics _managedMaintenanceWindowStatusClientDiagnostics; + private readonly ManagedMaintenanceWindowStatusRestOperations _managedMaintenanceWindowStatusRestClient; private readonly ServiceFabricManagedClusterData _data; /// Gets the resource type for the operations. @@ -72,10 +73,10 @@ internal ServiceFabricManagedClusterResource(ArmClient client, ResourceIdentifie _serviceFabricManagedClusterManagedClustersRestClient = new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceFabricManagedClusterManagedClustersApiVersion); _managedAzResiliencyStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); _managedAzResiliencyStatusRestClient = new ManagedAzResiliencyStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _managedMaintenanceWindowStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _managedMaintenanceWindowStatusRestClient = new ManagedMaintenanceWindowStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _managedApplyMaintenanceWindowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); _managedApplyMaintenanceWindowRestClient = new ManagedApplyMaintenanceWindowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _managedMaintenanceWindowStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _managedMaintenanceWindowStatusRestClient = new ManagedMaintenanceWindowStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -102,142 +103,142 @@ 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 ServiceFabricManagedApplicationTypeResources in the ServiceFabricManagedCluster. - /// An object representing collection of ServiceFabricManagedApplicationTypeResources and their operations over a ServiceFabricManagedApplicationTypeResource. - public virtual ServiceFabricManagedApplicationTypeCollection GetServiceFabricManagedApplicationTypes() + /// Gets a collection of ServiceFabricManagedApplicationResources in the ServiceFabricManagedCluster. + /// An object representing collection of ServiceFabricManagedApplicationResources and their operations over a ServiceFabricManagedApplicationResource. + public virtual ServiceFabricManagedApplicationCollection GetServiceFabricManagedApplications() { - return GetCachedClient(client => new ServiceFabricManagedApplicationTypeCollection(client, Id)); + return GetCachedClient(client => new ServiceFabricManagedApplicationCollection(client, Id)); } /// - /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application type name resource. + /// The name of the application resource. /// 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> GetServiceFabricManagedApplicationTypeAsync(string applicationTypeName, CancellationToken cancellationToken = default) + public virtual async Task> GetServiceFabricManagedApplicationAsync(string applicationName, CancellationToken cancellationToken = default) { - return await GetServiceFabricManagedApplicationTypes().GetAsync(applicationTypeName, cancellationToken).ConfigureAwait(false); + return await GetServiceFabricManagedApplications().GetAsync(applicationName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application type name resource. + /// The name of the application resource. /// 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 GetServiceFabricManagedApplicationType(string applicationTypeName, CancellationToken cancellationToken = default) + public virtual Response GetServiceFabricManagedApplication(string applicationName, CancellationToken cancellationToken = default) { - return GetServiceFabricManagedApplicationTypes().Get(applicationTypeName, cancellationToken); + return GetServiceFabricManagedApplications().Get(applicationName, cancellationToken); } - /// Gets a collection of ServiceFabricManagedApplicationResources in the ServiceFabricManagedCluster. - /// An object representing collection of ServiceFabricManagedApplicationResources and their operations over a ServiceFabricManagedApplicationResource. - public virtual ServiceFabricManagedApplicationCollection GetServiceFabricManagedApplications() + /// Gets a collection of ServiceFabricManagedApplicationTypeResources in the ServiceFabricManagedCluster. + /// An object representing collection of ServiceFabricManagedApplicationTypeResources and their operations over a ServiceFabricManagedApplicationTypeResource. + public virtual ServiceFabricManagedApplicationTypeCollection GetServiceFabricManagedApplicationTypes() { - return GetCachedClient(client => new ServiceFabricManagedApplicationCollection(client, Id)); + return GetCachedClient(client => new ServiceFabricManagedApplicationTypeCollection(client, Id)); } /// - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application resource. + /// The name of the application type name resource. /// 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> GetServiceFabricManagedApplicationAsync(string applicationName, CancellationToken cancellationToken = default) + public virtual async Task> GetServiceFabricManagedApplicationTypeAsync(string applicationTypeName, CancellationToken cancellationToken = default) { - return await GetServiceFabricManagedApplications().GetAsync(applicationName, cancellationToken).ConfigureAwait(false); + return await GetServiceFabricManagedApplicationTypes().GetAsync(applicationTypeName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application resource. + /// The name of the application type name resource. /// 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 GetServiceFabricManagedApplication(string applicationName, CancellationToken cancellationToken = default) + public virtual Response GetServiceFabricManagedApplicationType(string applicationTypeName, CancellationToken cancellationToken = default) { - return GetServiceFabricManagedApplications().Get(applicationName, cancellationToken); + return GetServiceFabricManagedApplicationTypes().Get(applicationTypeName, cancellationToken); } /// Gets a collection of ServiceFabricManagedNodeTypeResources in the ServiceFabricManagedCluster. @@ -256,11 +257,11 @@ public virtual ServiceFabricManagedNodeTypeCollection GetServiceFabricManagedNod /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -287,11 +288,11 @@ public virtual async Task> GetSer /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -318,11 +319,11 @@ public virtual Response GetServiceFabricMa /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -358,11 +359,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -398,11 +399,11 @@ public virtual Response Get(CancellationTok /// /// /// Operation Id - /// ManagedClusters_Delete + /// ManagedCluster_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -440,11 +441,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// ManagedClusters_Delete + /// ManagedCluster_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -482,11 +483,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// ManagedClusters_Update + /// ManagedCluster_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -524,11 +525,11 @@ public virtual async Task> UpdateA /// /// /// Operation Id - /// ManagedClusters_Update + /// ManagedCluster_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -558,30 +559,38 @@ public virtual Response Update(ServiceFabri } /// - /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// Gets a fault simulation by the simulationId. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation /// /// /// Operation Id - /// managedAzResiliencyStatus_Get + /// ManagedClusters_GetFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// + /// parameter with fault simulation id. /// The cancellation token to use. - public virtual async Task> GetManagedAzResiliencyStatusAsync(CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> GetFaultSimulationAsync(FaultSimulationIdContent content, CancellationToken cancellationToken = default) { - using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetFaultSimulation"); scope.Start(); try { - var response = await _managedAzResiliencyStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _serviceFabricManagedClusterManagedClustersRestClient.GetFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -592,30 +601,38 @@ public virtual async Task> GetManagedAzResil } /// - /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// Gets a fault simulation by the simulationId. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation /// /// /// Operation Id - /// managedAzResiliencyStatus_Get + /// ManagedClusters_GetFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// + /// parameter with fault simulation id. /// The cancellation token to use. - public virtual Response GetManagedAzResiliencyStatus(CancellationToken cancellationToken = default) + /// is null. + public virtual Response GetFaultSimulation(FaultSimulationIdContent content, CancellationToken cancellationToken = default) { - using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetFaultSimulation"); scope.Start(); try { - var response = _managedAzResiliencyStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _serviceFabricManagedClusterManagedClustersRestClient.GetFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); return response; } catch (Exception e) @@ -626,30 +643,274 @@ public virtual Response GetManagedAzResiliencyStatus( } /// - /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// Gets the list of recent fault simulations for the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation /// /// /// Operation Id - /// managedMaintenanceWindowStatus_Get + /// ManagedClusters_ListFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetManagedMaintenanceWindowStatuAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFaultSimulationAsync(CancellationToken cancellationToken = default) { - using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "ServiceFabricManagedClusterResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of recent fault simulations for the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFaultSimulation(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "ServiceFabricManagedClusterResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Starts a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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 describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StartFaultSimulation"); scope.Start(); try { - var response = await _managedMaintenanceWindowStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _serviceFabricManagedClusterManagedClustersRestClient.StartFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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 describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartFaultSimulation(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedClusterManagedClustersRestClient.StartFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedClusterManagedClustersRestClient.StopFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, 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; + } + } + + /// + /// Stops a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopFaultSimulation(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedClusterManagedClustersRestClient.StopFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// + /// + /// Operation Id + /// ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetManagedAzResiliencyStatusAsync(CancellationToken cancellationToken = default) + { + using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + scope.Start(); + try + { + var response = await _managedAzResiliencyStatusRestClient.GetManagedAzResiliencyStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -660,30 +921,30 @@ public virtual async Task> GetManagedMa } /// - /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus /// /// /// Operation Id - /// managedMaintenanceWindowStatus_Get + /// ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The cancellation token to use. - public virtual Response GetManagedMaintenanceWindowStatu(CancellationToken cancellationToken = default) + public virtual Response GetManagedAzResiliencyStatus(CancellationToken cancellationToken = default) { - using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); scope.Start(); try { - var response = _managedMaintenanceWindowStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _managedAzResiliencyStatusRestClient.GetManagedAzResiliencyStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -702,11 +963,11 @@ public virtual Response GetManagedMaintenanceWin /// /// /// Operation Id - /// managedApplyMaintenanceWindow_Post + /// ManagedApplyMaintenanceWindow_Post /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -736,11 +997,11 @@ public virtual async Task PostManagedApplyMaintenanceWindowAsync(Cance /// /// /// Operation Id - /// managedApplyMaintenanceWindow_Post + /// ManagedApplyMaintenanceWindow_Post /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -761,6 +1022,74 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc } } + /// + /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// + /// + /// Operation Id + /// ManagedMaintenanceWindowStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetManagedMaintenanceWindowStatuAsync(CancellationToken cancellationToken = default) + { + using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + scope.Start(); + try + { + var response = await _managedMaintenanceWindowStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// + /// + /// Operation Id + /// ManagedMaintenanceWindowStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetManagedMaintenanceWindowStatu(CancellationToken cancellationToken = default) + { + using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + scope.Start(); + try + { + var response = _managedMaintenanceWindowStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// @@ -770,11 +1099,11 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -832,11 +1161,11 @@ public virtual async Task> AddTagA /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -894,11 +1223,11 @@ public virtual Response AddTag(string key, /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -951,11 +1280,11 @@ public virtual async Task> SetTags /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -1008,11 +1337,11 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -1068,11 +1397,11 @@ public virtual async Task> RemoveT /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs index 0b72e38e5e2e..9c1d9a9d939b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// NodeTypes_CreateOrUpdate + /// NodeType_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task> Cr /// /// /// Operation Id - /// NodeTypes_CreateOrUpdate + /// NodeType_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task> GetAsy /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string nodeTyp /// /// /// Operation Id - /// NodeTypes_ListByManagedClusters + /// NodeType_ListByManagedClusters /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Operation Id - /// NodeTypes_ListByManagedClusters + /// NodeType_ListByManagedClusters /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -308,11 +308,11 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string nodeTypeName, Cance /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -394,11 +394,11 @@ public virtual Response Exists(string nodeTypeName, CancellationToken canc /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -439,11 +439,11 @@ public virtual async Task /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs index b12c57517740..c8f8d7691486 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs @@ -37,11 +37,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -53,6 +48,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndObject(); } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsPrimary)) @@ -292,6 +292,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("securityType"u8); writer.WriteStringValue(SecurityType.Value.ToString()); } + if (Optional.IsDefined(SecurityEncryptionType)) + { + writer.WritePropertyName("securityEncryptionType"u8); + writer.WriteStringValue(SecurityEncryptionType.Value.ToString()); + } if (Optional.IsDefined(IsSecureBootEnabled)) { writer.WritePropertyName("secureBootEnabled"u8); @@ -367,6 +372,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(IsZoneBalanceEnabled)) + { + writer.WritePropertyName("zoneBalance"u8); + writer.WriteBooleanValue(IsZoneBalanceEnabled.Value); + } writer.WriteEndObject(); } @@ -390,8 +400,8 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged { return null; } - NodeTypeSku sku = default; IDictionary tags = default; + NodeTypeSku sku = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -434,6 +444,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged ResourceIdentifier subnetId = default; IList vmSetupActions = default; ServiceFabricManagedClusterSecurityType? securityType = default; + NodeTypeSecurityEncryptionType? securityEncryptionType = default; bool? secureBootEnabled = default; bool? enableNodePublicIP = default; bool? enableNodePublicIPv6 = default; @@ -446,19 +457,11 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged IList additionalNetworkInterfaceConfigurations = default; string computerNamePrefix = default; IList vmApplications = default; + bool? zoneBalance = 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 = NodeTypeSku.DeserializeNodeTypeSku(property.Value, options); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -473,6 +476,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged tags = dictionary; continue; } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = NodeTypeSku.DeserializeNodeTypeSku(property.Value, options); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -822,7 +834,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("vmImageResourceId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -831,7 +843,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("subnetId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -861,6 +873,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged securityType = new ServiceFabricManagedClusterSecurityType(property0.Value.GetString()); continue; } + if (property0.NameEquals("securityEncryptionType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityEncryptionType = new NodeTypeSecurityEncryptionType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("secureBootEnabled"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -890,7 +911,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("vmSharedGalleryImageId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -899,7 +920,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("natGatewayId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -931,7 +952,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("serviceArtifactReferenceId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -940,7 +961,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("dscpConfigurationId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -980,6 +1001,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged vmApplications = array; continue; } + if (property0.NameEquals("zoneBalance"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneBalance = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -994,7 +1024,6 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged name, type, systemData, - sku, isPrimary, vmInstanceCount, dataDiskSizeGB, @@ -1033,6 +1062,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged subnetId, vmSetupActions ?? new ChangeTrackingList(), securityType, + securityEncryptionType, secureBootEnabled, enableNodePublicIP, enableNodePublicIPv6, @@ -1045,7 +1075,9 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged additionalNetworkInterfaceConfigurations ?? new ChangeTrackingList(), computerNamePrefix, vmApplications ?? new ChangeTrackingList(), + zoneBalance, tags ?? new ChangeTrackingDictionary(), + sku, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs index dc5a7d9c304d..91998e0df48f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs @@ -74,9 +74,8 @@ public ServiceFabricManagedNodeTypeData() /// The name. /// The resourceType. /// The systemData. - /// The node type sku. /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. /// Disk size for the managed disk attached to the vms on the node type in GBs. /// Managed data disk type. Specifies the storage account type for the managed disk. /// Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. @@ -112,8 +111,9 @@ public ServiceFabricManagedNodeTypeData() /// Indicates the resource id of the vm image. This parameter is used for custom vm image. /// Indicates the resource id of the subnet for the node type. /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. /// Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. /// Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. @@ -125,11 +125,12 @@ public ServiceFabricManagedNodeTypeData() /// Specifies the settings for any additional secondary network interfaces to attach to the node type. /// Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. /// Specifies the gallery applications that should be made available to the underlying VMSS. - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + /// Resource tags. + /// The node type sku. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IList vmSecrets, IList vmExtensions, VmManagedIdentity vmManagedIdentity, bool? isStateless, bool? hasMultiplePlacementGroups, IList frontendConfigurations, IList networkSecurityRules, IList additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IList zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IList vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IList natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IList additionalNetworkInterfaceConfigurations, string computerNamePrefix, IList vmApplications, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IList vmSecrets, IList vmExtensions, VmManagedIdentity vmManagedIdentity, bool? isStateless, bool? hasMultiplePlacementGroups, IList frontendConfigurations, IList networkSecurityRules, IList additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IList zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IList vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, NodeTypeSecurityEncryptionType? securityEncryptionType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IList natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IList additionalNetworkInterfaceConfigurations, string computerNamePrefix, IList vmApplications, bool? isZoneBalanceEnabled, IDictionary tags, NodeTypeSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - Sku = sku; IsPrimary = isPrimary; VmInstanceCount = vmInstanceCount; DataDiskSizeInGB = dataDiskSizeInGB; @@ -168,6 +169,7 @@ internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, Re SubnetId = subnetId; VmSetupActions = vmSetupActions; SecurityType = securityType; + SecurityEncryptionType = securityEncryptionType; IsSecureBootEnabled = isSecureBootEnabled; IsNodePublicIPEnabled = isNodePublicIPEnabled; IsNodePublicIPv6Enabled = isNodePublicIPv6Enabled; @@ -180,15 +182,15 @@ internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, Re AdditionalNetworkInterfaceConfigurations = additionalNetworkInterfaceConfigurations; ComputerNamePrefix = computerNamePrefix; VmApplications = vmApplications; + IsZoneBalanceEnabled = isZoneBalanceEnabled; Tags = tags; + Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The node type sku. - public NodeTypeSku Sku { get; set; } /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. public bool? IsPrimary { get; set; } - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. public int? VmInstanceCount { get; set; } /// Disk size for the managed disk attached to the vms on the node type in GBs. public int? DataDiskSizeInGB { get; set; } @@ -271,9 +273,11 @@ public IList UserAssignedIdentities public ResourceIdentifier SubnetId { get; set; } /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. public IList VmSetupActions { get; } - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. public ServiceFabricManagedClusterSecurityType? SecurityType { get; set; } - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + public NodeTypeSecurityEncryptionType? SecurityEncryptionType { get; set; } + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. public bool? IsSecureBootEnabled { get; set; } /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. public bool? IsNodePublicIPEnabled { get; set; } @@ -297,7 +301,11 @@ public IList UserAssignedIdentities public string ComputerNamePrefix { get; set; } /// Specifies the gallery applications that should be made available to the underlying VMSS. public IList VmApplications { get; } - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + public bool? IsZoneBalanceEnabled { get; set; } + /// Resource tags. public IDictionary Tags { get; } + /// The node type sku. + public NodeTypeSku Sku { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs index 0a16fe386ec3..1a4bf5aa18f0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs @@ -104,11 +104,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -144,11 +144,11 @@ public virtual async Task> GetAsy /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -184,11 +184,11 @@ public virtual Response Get(CancellationTo /// /// /// Operation Id - /// NodeTypes_Delete + /// NodeType_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -226,11 +226,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// NodeTypes_Delete + /// NodeType_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -268,11 +268,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// NodeTypes_Update + /// NodeType_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -314,11 +314,11 @@ public virtual async Task> Up /// /// /// Operation Id - /// NodeTypes_Update + /// NodeType_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -352,19 +352,19 @@ public virtual ArmOperation Update(WaitUnt } /// - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate /// /// /// Operation Id - /// NodeTypes_Restart + /// NodeTypes_Deallocate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -373,19 +373,19 @@ public virtual ArmOperation Update(WaitUnt /// /// /// 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 for restart action. + /// parameters for deallocate action. /// The cancellation token to use. /// is null. - public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual async Task DeallocateAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Deallocate"); scope.Start(); try { - var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeallocateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -398,19 +398,19 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTy } /// - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate /// /// /// Operation Id - /// NodeTypes_Restart + /// NodeTypes_Deallocate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -419,19 +419,203 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTy /// /// /// 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 for restart action. + /// parameters for deallocate action. /// The cancellation token to use. /// is null. - public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation Deallocate(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Deallocate"); scope.Start(); try { - var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Deallocate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// + /// + /// Operation Id + /// NodeTypes_DeleteNode + /// + /// + /// Default Api Version + /// 2025-03-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 for delete action. + /// The cancellation token to use. + /// is null. + public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// + /// + /// Operation Id + /// NodeTypes_DeleteNode + /// + /// + /// Default Api Version + /// 2025-03-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 for delete action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy + /// + /// + /// Operation Id + /// NodeTypes_Redeploy + /// + /// + /// Default Api Version + /// 2025-03-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 for redeploy action. + /// The cancellation token to use. + /// is null. + public virtual async Task RedeployAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Redeploy"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RedeployAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy + /// + /// + /// Operation Id + /// NodeTypes_Redeploy + /// + /// + /// Default Api Version + /// 2025-03-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 for redeploy action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Redeploy(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Redeploy"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Redeploy(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -456,7 +640,7 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent c /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -502,7 +686,7 @@ public virtual async Task ReimageAsync(WaitUntil waitUntil, NodeTy /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -536,19 +720,19 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, NodeTypeActionContent c } /// - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart /// /// /// Operation Id - /// NodeTypes_DeleteNode + /// NodeTypes_Restart /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -557,19 +741,19 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, NodeTypeActionContent 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. - /// parameters for delete action. + /// parameters for restart action. /// The cancellation token to use. /// is null. - public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); scope.Start(); try { - var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -582,19 +766,19 @@ public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, Nod } /// - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart /// /// /// Operation Id - /// NodeTypes_DeleteNode + /// NodeTypes_Restart /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -603,19 +787,19 @@ public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, Nod /// /// /// 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 for delete action. + /// parameters for restart action. /// The cancellation token to use. /// is null. - public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); scope.Start(); try { - var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -627,6 +811,426 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten } } + /// + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start + /// + /// + /// Operation Id + /// NodeTypes_Start + /// + /// + /// Default Api Version + /// 2025-03-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 for start action. + /// The cancellation token to use. + /// is null. + public virtual async Task StartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Start"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start + /// + /// + /// Operation Id + /// NodeTypes_Start + /// + /// + /// Default Api Version + /// 2025-03-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 for start action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Start(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Start"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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 describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StartFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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 describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartFaultSimulation(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.StartFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StopFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, 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; + } + } + + /// + /// Stops a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopFaultSimulation(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.StopFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, 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; + } + } + + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_GetFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetFaultSimulationAsync(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.GetFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_GetFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual Response GetFaultSimulation(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.GetFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of recent fault simulations for the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFaultSimulationAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of recent fault simulations for the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFaultSimulation(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + /// /// Get a Service Fabric node type supported SKUs. /// @@ -636,11 +1240,11 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten /// /// /// Operation Id - /// NodeTypeSkus_List + /// NodeTypeSkus_GetAvailableSkus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -648,8 +1252,8 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAvailableSkusAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateGetAvailableSkusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateGetAvailableSkusNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NodeTypeAvailableSku.DeserializeNodeTypeAvailableSku(e), _nodeTypeSkusClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetAvailableSkus", "value", "nextLink", cancellationToken); } @@ -662,11 +1266,11 @@ public virtual AsyncPageable GetAvailableSkusAsync(Cancell /// /// /// Operation Id - /// NodeTypeSkus_List + /// NodeTypeSkus_GetAvailableSkus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -674,8 +1278,8 @@ public virtual AsyncPageable GetAvailableSkusAsync(Cancell /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAvailableSkus(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateGetAvailableSkusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateGetAvailableSkusNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NodeTypeAvailableSku.DeserializeNodeTypeAvailableSku(e), _nodeTypeSkusClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetAvailableSkus", "value", "nextLink", cancellationToken); } @@ -688,11 +1292,11 @@ public virtual Pageable GetAvailableSkus(CancellationToken /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -750,11 +1354,11 @@ public virtual async Task> AddTag /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -812,11 +1416,11 @@ public virtual Response AddTag(string key, /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -869,11 +1473,11 @@ public virtual async Task> SetTag /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -926,11 +1530,11 @@ public virtual Response SetTags(IDictionar /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -986,11 +1590,11 @@ public virtual async Task> Remove /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs index 63ca0b196ff8..a79bd7357d9d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_CreateOrUpdate + /// ServiceResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task> Cre /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_CreateOrUpdate + /// ServiceResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task> GetAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(string serviceN /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services /// /// /// Operation Id - /// Services_ListByApplications + /// ServiceResource_ListByApplications /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services /// /// /// Operation Id - /// Services_ListByApplications + /// ServiceResource_ListByApplications /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetAll(Cancellation /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs index 710becbf7667..09c689cb7921 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs @@ -32,7 +32,7 @@ public partial class ServiceFabricManagedServiceResource : ArmResource /// The serviceName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, string serviceName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}"; return new ResourceIdentifier(resourceId); } @@ -41,7 +41,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedServiceData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applications/services"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applications/services"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedServiceResource() @@ -96,15 +96,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -136,15 +136,15 @@ public virtual async Task> GetAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -176,15 +176,15 @@ public virtual Response Get(CancellationTok /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Delete + /// ServiceResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -218,15 +218,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Delete + /// ServiceResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -260,15 +260,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Update + /// ServiceResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -302,15 +302,15 @@ public virtual async Task> UpdateA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Update + /// ServiceResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -344,15 +344,15 @@ public virtual Response Update(ServiceFabri /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -406,15 +406,15 @@ public virtual async Task> AddTagA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -468,15 +468,15 @@ public virtual Response AddTag(string key, /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -525,15 +525,15 @@ public virtual async Task> SetTags /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -582,15 +582,15 @@ public virtual Response SetTags(IDictionary /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -642,15 +642,15 @@ public virtual async Task> RemoveT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md deleted file mode 100644 index 9cb67e35a1d0..000000000000 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md +++ /dev/null @@ -1,232 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: ServiceFabricManagedClusters -namespace: Azure.ResourceManager.ServiceFabricManagedClusters -require: https://github.com/Azure/azure-rest-api-specs/blob/f17b769690a46d858134ee68ef0d89635083b560/specification/servicefabricmanagedclusters/resource-manager/readme.md -#tag: package-2024-09-preview -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../tests/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -request-path-is-non-resource: -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -models-to-treat-empty-string-as-null: - - ManagedClusterSubnet - - NodeTypeFrontendConfiguration - - ServiceFabricManagedClusterData - - ServiceFabricManagedClusterVersion - - ServiceFabricManagedNodeTypeData - - VmManagedIdentity - -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 - LRS: Lrs - SSD: Ssd - -override-operation-name: - managedAzResiliencyStatus_get: GetManagedAzResiliencyStatus - NodeTypeSkus_List: GetAvailableSkus - managedUnsupportedVMSizes_Get: GetManagedUnsupportedVmSize - managedUnsupportedVMSizes_List: GetManagedUnsupportedVmSizes - ManagedClusterVersion_GetByEnvironment: GetManagedClusterVersionByEnvironment - managedAzResiliencyStatus_Get: GetManagedAzResiliencyStatus - -rename-mapping: - ApplicationResource: ServiceFabricManagedApplication - ApplicationTypeResource: ServiceFabricManagedApplicationType - ApplicationTypeVersionResource: ServiceFabricManagedApplicationTypeVersion - ApplicationUserAssignedIdentity: ApplicationUserAssignedIdentityInfo - ManagedClusterCodeVersionResult: ServiceFabricManagedClusterVersion - ManagedClusterCodeVersionResult.properties.supportExpiryUtc: VersionSupportExpireOn - OsType: ServiceFabricManagedClusterOSType - ManagedCluster: ServiceFabricManagedCluster - ManagedCluster.properties.addonFeatures: AddOnFeatures - ManagedCluster.properties.allowRdpAccess: IsRdpAccessAllowed - ManagedCluster.properties.clusterCertificateThumbprints: -|any - ManagedCluster.properties.clusterId: -|uuid - ManagedCluster.properties.enableAutoOSUpgrade: IsAutoOSUpgradeEnabled - ManagedCluster.properties.enableIpv6: IsIPv6Enabled - ManagedCluster.properties.enableServicePublicIP: IsServicePublicIPEnabled - ManagedCluster.properties.ipv4Address: -|ip-address - ManagedCluster.properties.ipv6Address: -|ip-address - ManagedCluster.properties.zonalResiliency: HasZoneResiliency - ManagedCluster.properties.enableHttpGatewayExclusiveAuthMode: IsHttpGatewayExclusiveAuthModeEnabled - - Subnet: ManagedClusterSubnet - Subnet.enableIpv6: IsIPv6Enabled - Subnet.networkSecurityGroupId: -|arm-id - AzureActiveDirectory: ManagedClusterAzureActiveDirectory - ClientCertificate: ManagedClusterClientCertificate - ClientCertificate.thumbprint: -|any - ClientCertificate.issuerThumbprint: -|any - ClusterState: ServiceFabricManagedClusterState - ClusterUpgradeCadence: ManagedClusterUpgradeCadence - ClusterUpgradeMode: ManagedClusterUpgradeMode - SettingsSectionDescription: ClusterFabricSettingsSection - SettingsParameterDescription: ClusterFabricSettingsParameterDescription - IpTag: ManagedClusterIPTag - LoadBalancingRule: ManagedClusterLoadBalancingRule - NetworkSecurityRule: ServiceFabricManagedNetworkSecurityRule - Direction: ServiceFabricManagedNetworkSecurityRuleDirection - Access: ServiceFabricManagedNetworkTrafficAccess - ManagedResourceProvisioningState: ServiceFabricManagedResourceProvisioningState - ServiceEndpoint: ManagedClusterServiceEndpoint - ServiceEndpoint.locations: -|azure-location - NodeType: ServiceFabricManagedNodeType - NodeType.properties.dataDiskSizeGB: DataDiskSizeInGB - NodeType.properties.enableAcceleratedNetworking: IsAcceleratedNetworkingEnabled - NodeType.properties.enableEncryptionAtHost: IsEncryptionAtHostEnabled - NodeType.properties.enableOverProvisioning: IsOverProvisioningEnabled - NodeType.properties.multiplePlacementGroups: HasMultiplePlacementGroups - NodeType.properties.enableNodePublicIPv6: IsNodePublicIPv6Enabled - VmApplication : ServiceFabricManagedVmApplication - VmssDataDisk: NodeTypeVmssDataDisk - VmssDataDisk.diskSizeGB: DiskSizeInGB - VmssExtension: NodeTypeVmssExtension - VmssExtension.properties.enableAutomaticUpgrade: IsAutomaticUpgradeEnabled - VaultSecretGroup: NodeTypeVaultSecretGroup - VaultCertificate: NodeTypeVaultCertificate - DiskType: ServiceFabricManagedDataDiskType - FrontendConfiguration: NodeTypeFrontendConfiguration - FrontendConfiguration.loadBalancerBackendAddressPoolId: -|arm-id - FrontendConfiguration.loadBalancerInboundNatPoolId: -|arm-id - VmManagedIdentity.userAssignedIdentities: -|arm-id - NodeTypeActionParameters: NodeTypeActionContent - NodeTypeActionParameters.force: IsForced - ServiceResource: ServiceFabricManagedService - ServiceResourceProperties: ManagedServiceProperties - ServiceResourcePropertiesBase: ManagedServiceBaseProperties - ServiceCorrelation: ManagedServiceCorrelation - ServiceCorrelationScheme: ManagedServiceCorrelationScheme - ScalingPolicy: ManagedServiceScalingPolicy - ScalingMechanism: ManagedServiceScalingMechanism - ScalingTrigger: ManagedServiceScalingTrigger - MoveCost: ServiceFabricManagedServiceMoveCost - ApplicationUpgradePolicy.instanceCloseDelayDuration: InstanceCloseDelayDurationInSeconds - FailureAction: PolicyViolationCompensationAction - IPAddressType: NodeTypeFrontendConfigurationIPAddressType - ProbeProtocol: ManagedClusterLoadBalanceProbeProtocol - Protocol: ManagedClusterLoadBalancingRuleTransportProtocol - Partition: ManagedServicePartitionScheme - NsgProtocol: ServiceFabricManagedNsgProtocol - NsgProtocol.ah: AH - NodeTypeAvailableSku.resourceType: -|resource-type - PartitionInstanceCountScaleMechanism: PartitionInstanceCountScalingMechanism - PrivateEndpointNetworkPolicies: ManagedClusterSubnetPrivateEndpointNetworkPoliciesState - PrivateLinkServiceNetworkPolicies: ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState - ServiceLoadMetric: ManagedServiceLoadMetric - ServiceLoadMetricWeight: ManagedServiceLoadMetricWeight - ServicePackageActivationMode: ManagedServicePackageActivationMode - ServicePlacementPolicy: ManagedServicePlacementPolicy - ManagedVMSize: ServiceFabricManagedUnsupportedVmSize - AddRemoveIncrementalNamedPartitionScalingMechanism: NamedPartitionAddOrRemoveScalingMechanism - NodeType.properties.enableNodePublicIP: IsNodePublicIPEnabled - NodeType.properties.secureBootEnabled: IsSecureBootEnabled - EvictionPolicyType: SpotNodeVmEvictionPolicyType - ResourceAzStatus.resourceType: -|resource-type - SecurityType: ServiceFabricManagedClusterSecurityType - UpdateType: ServiceFabricManagedClusterUpdateType - ClusterHealthPolicy: ManagedClusterHealthPolicy - ClusterUpgradePolicy: ManagedClusterUpgradePolicy - ClusterUpgradeDeltaHealthPolicy: ManagedClusterUpgradeDeltaHealthPolicy - ClusterMonitoringPolicy: ManagedClusterMonitoringPolicy - PrivateIPAddressVersion: ServiceFabricManagedClusterPrivateIPAddressVersion - PublicIPAddressVersion: ServiceFabricManagedClusterPublicIPAddressVersion - IpConfiguration: ServiceFabricManagedClusterIPConfiguration - IpConfigurationPublicIPAddressConfiguration: ServiceFabricManagedClusterPublicIPAddressConfiguration - ManagedMaintenanceWindowStatus.lastWindowStatusUpdateAtUTC: LastWindowStatusUpdatedOn - ManagedMaintenanceWindowStatus.lastWindowStartTimeUTC: LastWindowStartOn - ManagedMaintenanceWindowStatus.lastWindowEndTimeUTC: LastWindowEndOn - -suppress-abstract-base-class: -- ManagedServiceProperties - -directive: - - remove-operation: OperationStatus_Get - - remove-operation: OperationResults_Get - - from: managedapplication.json - where: $.definitions - transform: > - $.HealthCheckWaitDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckStableDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckRetryTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeDomainTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeTimeout['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.replicaRestartWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.quorumLossWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.standByReplicaKeepDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.servicePlacementTimeLimit['x-ms-format'] = 'duration-constant'; - - from: managedcluster.json - where: $.definitions - transform: > - $.ManagedClusterVersionDetails.properties.supportExpiryUtc['format'] = 'date-time'; - - from: nodetype.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'].patch - transform: > - $['responses'] = { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "202": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "default": { - "description": "The detailed error response.", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - } - reason: response status 202 missing -``` diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs index f93bc022e2e0..69096b8c819e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs @@ -7,10 +7,8 @@ using System; using System.Threading.Tasks; -using System.Xml; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples @@ -21,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json - // this example is just showing the usage of "Applications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPutOperation_example_max.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -44,34 +42,6 @@ public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() string applicationName = "myApp"; ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(new AzureLocation("eastus")) { - Version = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - Parameters = -{ -["param1"] = "value1" -}, - UpgradePolicy = new ApplicationUpgradePolicy - { - ApplicationHealthPolicy = new ApplicationHealthPolicy(true, 0) - { - DefaultServiceTypeHealthPolicy = new ServiceTypeHealthPolicy(0, 0, 0), - ServiceTypeHealthPolicyMap = -{ -["service1"] = new ServiceTypeHealthPolicy(30, 30, 30) -}, - }, - ForceRestart = false, - RollingUpgradeMonitoringPolicy = new RollingUpgradeMonitoringPolicy( - PolicyViolationCompensationAction.Rollback, - XmlConvert.ToTimeSpan("00:02:00"), - XmlConvert.ToTimeSpan("00:05:00"), - XmlConvert.ToTimeSpan("00:10:00"), - XmlConvert.ToTimeSpan("01:00:00"), - XmlConvert.ToTimeSpan("00:15:00")), - InstanceCloseDelayDurationInSeconds = 600L, - UpgradeMode = RollingUpgradeMode.UnmonitoredAuto, - UpgradeReplicaSetCheckTimeout = 3600L, - RecreateApplication = false, - }, Tags = { ["a"] = "b" @@ -91,8 +61,8 @@ public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json - // this example is just showing the usage of "Applications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPutOperation_example_min.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -112,10 +82,7 @@ public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() // invoke the operation string applicationName = "myApp"; - ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(new AzureLocation("eastus")) - { - Version = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; + ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(new AzureLocation("eastus")); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationName, data); ServiceFabricManagedApplicationResource result = lro.Value; @@ -130,8 +97,8 @@ public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -164,8 +131,8 @@ public async Task Get_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json - // this example is just showing the usage of "Applications_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationListOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -200,8 +167,8 @@ public async Task GetAll_GetAListOfApplicationResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -230,8 +197,8 @@ public async Task Exists_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs index 984161f5498b..bd7f7d1c22da 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -51,8 +51,8 @@ public async Task Get_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json - // this example is just showing the usage of "Applications_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationDeleteOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -78,8 +78,8 @@ public async Task Delete_DeleteAnApplication() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json - // this example is just showing the usage of "Applications_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPatchOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -116,7 +116,7 @@ public async Task Update_PatchAnApplication() [Ignore("Only validating compilation of examples")] public async Task ReadUpgrade_GetAnApplicationUpgrade() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json + // Generated from example definition: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json // this example is just showing the usage of "Applications_ReadUpgrade" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,10 +141,10 @@ public async Task ReadUpgrade_GetAnApplicationUpgrade() [Test] [Ignore("Only validating compilation of examples")] - public async Task StartRollback_StartAnApplicationUpgradeRollback() + public async Task ResumeUpgrade_ResumeUpgrade() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json - // this example is just showing the usage of "Applications_StartRollback" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json + // this example is just showing the usage of "Applications_ResumeUpgrade" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -161,17 +161,21 @@ public async Task StartRollback_StartAnApplicationUpgradeRollback() ServiceFabricManagedApplicationResource serviceFabricManagedApplication = client.GetServiceFabricManagedApplicationResource(serviceFabricManagedApplicationResourceId); // invoke the operation - await serviceFabricManagedApplication.StartRollbackAsync(WaitUntil.Completed); + RuntimeResumeApplicationUpgradeContent content = new RuntimeResumeApplicationUpgradeContent + { + UpgradeDomainName = "UD1", + }; + await serviceFabricManagedApplication.ResumeUpgradeAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task ResumeUpgrade_ResumeUpgrade() + public async Task StartRollback_StartAnApplicationUpgradeRollback() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json - // this example is just showing the usage of "Applications_ResumeUpgrade" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationActionStartRollback_example.json + // this example is just showing the usage of "Applications_StartRollback" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -188,11 +192,7 @@ public async Task ResumeUpgrade_ResumeUpgrade() ServiceFabricManagedApplicationResource serviceFabricManagedApplication = client.GetServiceFabricManagedApplicationResource(serviceFabricManagedApplicationResourceId); // invoke the operation - RuntimeResumeApplicationUpgradeContent content = new RuntimeResumeApplicationUpgradeContent - { - UpgradeDomainName = "UD1", - }; - await serviceFabricManagedApplication.ResumeUpgradeAsync(WaitUntil.Completed, content); + await serviceFabricManagedApplication.StartRollbackAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs index 44dcc5178039..2344446abc32 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json - // this example is just showing the usage of "ApplicationTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -55,8 +55,8 @@ public async Task CreateOrUpdate_PutAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -89,8 +89,8 @@ public async Task Get_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationTypeNameResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json - // this example is just showing the usage of "ApplicationTypes_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -125,8 +125,8 @@ public async Task GetAll_GetAListOfApplicationTypeNameResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -155,8 +155,8 @@ public async Task Exists_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs index cc07507171b4..97e49426ddc7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -51,8 +51,8 @@ public async Task Get_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -78,8 +78,8 @@ public async Task Delete_DeleteAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs index 2c05e6979767..7705ab4e1412 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeVersionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); @@ -41,10 +41,7 @@ public async Task CreateOrUpdate_PutAnApplicationTypeVersion() // invoke the operation string version = "1.0"; - ServiceFabricManagedApplicationTypeVersionData data = new ServiceFabricManagedApplicationTypeVersionData(new AzureLocation("eastus")) - { - AppPackageUri = new Uri("http://fakelink.test.com/MyAppType"), - }; + ServiceFabricManagedApplicationTypeVersionData data = new ServiceFabricManagedApplicationTypeVersionData(new AzureLocation("eastus")); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); ServiceFabricManagedApplicationTypeVersionResource result = lro.Value; @@ -59,8 +56,8 @@ public async Task CreateOrUpdate_PutAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); @@ -94,8 +91,8 @@ public async Task Get_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationTypeVersionResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_ListByApplicationTypes" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_ListByApplicationTypes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +128,8 @@ public async Task GetAll_GetAListOfApplicationTypeVersionResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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,8 +159,8 @@ public async Task Exists_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs index 3e6d04f5d223..a24083993c62 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeVersionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); @@ -80,8 +80,8 @@ public async Task Delete_DeleteAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs index 0836901ac378..f707dc476757 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs @@ -7,7 +7,6 @@ using System; using System.Threading.Tasks; -using System.Xml; using Azure.Core; using Azure.Identity; using Azure.ResourceManager.Resources; @@ -22,8 +21,8 @@ public partial class Sample_ServiceFabricManagedClusterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json - // this example is just showing the usage of "ManagedClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -44,80 +43,6 @@ public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() string clusterName = "mycluster"; ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("eastus"), new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Basic)) { - DnsName = "mycluster", - ClientConnectionPort = 19000, - HttpGatewayConnectionPort = 19080, - AdminUserName = "vmadmin", - AdminPassword = "{vm-password}", - LoadBalancingRules = {new ManagedClusterLoadBalancingRule(80, 80, new ManagedClusterLoadBalancingRuleTransportProtocol("http"), ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 80, -}, new ManagedClusterLoadBalancingRule(443, 443, new ManagedClusterLoadBalancingRuleTransportProtocol("http"), ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 443, -}, new ManagedClusterLoadBalancingRule(10000, 10000, ManagedClusterLoadBalancingRuleTransportProtocol.Tcp, ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 10000, -LoadDistribution = "Default", -}}, - IsRdpAccessAllowed = true, - NetworkSecurityRules = {new ServiceFabricManagedNetworkSecurityRule("TestName", ServiceFabricManagedNsgProtocol.Tcp, ServiceFabricManagedNetworkTrafficAccess.Allow, 1010, ServiceFabricManagedNetworkSecurityRuleDirection.Inbound) -{ -Description = "Test description", -SourceAddressPrefixes = {"*"}, -DestinationAddressPrefixes = {"*"}, -SourcePortRanges = {"*"}, -DestinationPortRanges = {"*"}, -}, new ServiceFabricManagedNetworkSecurityRule("AllowARM", new ServiceFabricManagedNsgProtocol("*"), ServiceFabricManagedNetworkTrafficAccess.Allow, 2002, ServiceFabricManagedNetworkSecurityRuleDirection.Inbound) -{ -SourceAddressPrefix = "AzureResourceManager", -DestinationAddressPrefix = "*", -SourcePortRange = "*", -DestinationPortRange = "33500-33699", -}}, - FabricSettings = {new ClusterFabricSettingsSection("ManagedIdentityTokenService", new ClusterFabricSettingsParameterDescription[] -{ -new ClusterFabricSettingsParameterDescription("IsEnabled", "true") -})}, - ClusterCodeVersion = "7.1.168.9494", - ClusterUpgradeMode = ManagedClusterUpgradeMode.Manual, - AddOnFeatures = { ManagedClusterAddOnFeature.DnsService, ManagedClusterAddOnFeature.BackupRestoreService, ManagedClusterAddOnFeature.ResourceMonitorService }, - IsAutoOSUpgradeEnabled = true, - HasZoneResiliency = true, - MaxUnusedVersionsToKeep = 3, - IsIPv6Enabled = true, - IPTags = { new ManagedClusterIPTag("FirstPartyUsage", "SQL") }, - AuxiliarySubnets = {new ManagedClusterSubnet("testSubnet1") -{ -IsIPv6Enabled = true, -PrivateEndpointNetworkPolicies = ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.Enabled, -PrivateLinkServiceNetworkPolicies = ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.Enabled, -NetworkSecurityGroupId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"), -}}, - ServiceEndpoints = {new ManagedClusterServiceEndpoint("Microsoft.Storage") -{ -Locations = {new AzureLocation("eastus2"), new AzureLocation("usnorth")}, -}}, - ZonalUpdateMode = ZonalUpdateMode.Fast, - UseCustomVnet = true, - PublicIPPrefixId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix"), - PublicIPv6PrefixId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix"), - DdosProtectionPlanId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan"), - UpgradeDescription = new ManagedClusterUpgradePolicy - { - ForceRestart = false, - HealthPolicy = new ManagedClusterHealthPolicy(10, 30), - DeltaHealthPolicy = new ManagedClusterUpgradeDeltaHealthPolicy(20) - { - MaxPercentUpgradeDomainDeltaUnhealthyNodes = 40, - MaxPercentDeltaUnhealthyApplications = 40, - }, - MonitoringPolicy = new ManagedClusterMonitoringPolicy(XmlConvert.ToTimeSpan("00:05:00"), XmlConvert.ToTimeSpan("00:45:00"), "00:55:00", "12:00:00", "03:00:00"), - }, - HttpGatewayTokenAuthConnectionPort = 19081, - IsHttpGatewayExclusiveAuthModeEnabled = true, - AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.SubscriptionReuse, - AllocatedOutboundPorts = 0, Tags = { }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data); @@ -134,8 +59,8 @@ public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json - // this example is just showing the usage of "ManagedClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPutOperation_example_min.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -154,18 +79,7 @@ public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() // invoke the operation string clusterName = "myCluster"; - ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("eastus"), new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Basic)) - { - DnsName = "myCluster", - AdminUserName = "vmadmin", - AdminPassword = "{vm-password}", - FabricSettings = {new ClusterFabricSettingsSection("ManagedIdentityTokenService", new ClusterFabricSettingsParameterDescription[] -{ -new ClusterFabricSettingsParameterDescription("IsEnabled", "true") -})}, - ClusterUpgradeMode = ManagedClusterUpgradeMode.Automatic, - ClusterUpgradeCadence = ManagedClusterUpgradeCadence.Wave1, - }; + ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("eastus"), new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Basic)); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data); ServiceFabricManagedClusterResource result = lro.Value; @@ -180,8 +94,8 @@ public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -213,8 +127,8 @@ public async Task Get_GetACluster() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListClusterByResourceGroup() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json - // this example is just showing the usage of "ManagedClusters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -248,8 +162,8 @@ public async Task GetAll_ListClusterByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -277,8 +191,8 @@ public async Task Exists_GetACluster() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs index 0bd17f608f82..30e6dee4b61d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedClusterResource [Ignore("Only validating compilation of examples")] public async Task Get_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -50,8 +50,8 @@ public async Task Get_GetACluster() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json - // this example is just showing the usage of "ManagedClusters_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -76,8 +76,8 @@ public async Task Delete_DeleteACluster() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAManagedCluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json - // this example is just showing the usage of "ManagedClusters_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPatchOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -113,8 +113,8 @@ public async Task Update_PatchAManagedCluster() [Ignore("Only validating compilation of examples")] public async Task GetManagedAzResiliencyStatus_AzResiliencyStatusOfBaseResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json - // this example is just showing the usage of "managedAzResiliencyStatus_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json + // this example is just showing the usage of "ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -137,10 +137,10 @@ public async Task GetManagedAzResiliencyStatus_AzResiliencyStatusOfBaseResources [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedMaintenanceWindowStatu_MaintenanceWindowStatus() + public async Task PostManagedApplyMaintenanceWindow_ApplyMaintenanceWindowStatus() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json - // this example is just showing the usage of "managedMaintenanceWindowStatus_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json + // this example is just showing the usage of "ManagedApplyMaintenanceWindow_Post" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -156,17 +156,17 @@ public async Task GetManagedMaintenanceWindowStatu_MaintenanceWindowStatus() ServiceFabricManagedClusterResource serviceFabricManagedCluster = client.GetServiceFabricManagedClusterResource(serviceFabricManagedClusterResourceId); // invoke the operation - ManagedMaintenanceWindowStatus result = await serviceFabricManagedCluster.GetManagedMaintenanceWindowStatuAsync(); + await serviceFabricManagedCluster.PostManagedApplyMaintenanceWindowAsync(); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task PostManagedApplyMaintenanceWindow_MaintenanceWindowStatus() + public async Task GetManagedMaintenanceWindowStatu_GetMaintenanceWindowStatus() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json - // this example is just showing the usage of "managedApplyMaintenanceWindow_Post" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json + // this example is just showing the usage of "ManagedMaintenanceWindowStatus_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(); @@ -182,9 +182,9 @@ public async Task PostManagedApplyMaintenanceWindow_MaintenanceWindowStatus() ServiceFabricManagedClusterResource serviceFabricManagedCluster = client.GetServiceFabricManagedClusterResource(serviceFabricManagedClusterResourceId); // invoke the operation - await serviceFabricManagedCluster.PostManagedApplyMaintenanceWindowAsync(); + ManagedMaintenanceWindowStatus result = await serviceFabricManagedCluster.GetManagedMaintenanceWindowStatuAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs index c26b9a8525cc..ccf71141da5b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs @@ -9,8 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.Resources.Models; -using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples @@ -21,8 +19,8 @@ public partial class Sample_ServiceFabricManagedNodeTypeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json + // this example is just showing the usage of "NodeType_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(); @@ -42,43 +40,7 @@ public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = -1, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.PremiumLrs, - PlacementProperties = -{ -["HasSSD"] = "true", -["NodeColor"] = "green", -["SomeProperty"] = "5" -}, - Capacities = -{ -["ClientConnections"] = "65536" -}, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmSecrets = {new NodeTypeVaultSecretGroup(new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault"), -}, new NodeTypeVaultCertificate[] -{ -new NodeTypeVaultCertificate(new Uri("https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c"), "My") -})}, - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -}}, - UserAssignedIdentities = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"), new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2") }, - IsStateless = true, - HasMultiplePlacementGroups = true, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -91,10 +53,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() + public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationCustomImage_example.json + // this example is just showing the usage of "NodeType_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(); @@ -113,110 +75,8 @@ public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() ServiceFabricManagedNodeTypeCollection collection = serviceFabricManagedCluster.GetServiceFabricManagedNodeTypes(); // invoke the operation - string nodeTypeName = "BE-testResourceGroup-testRegion-test"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.PremiumLrs, - DataDiskLetter = "S", - PlacementProperties = -{ -["HasSSD"] = "true", -["NodeColor"] = "green", -["SomeProperty"] = "5" -}, - Capacities = -{ -["ClientConnections"] = "65536" -}, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmSecrets = {new NodeTypeVaultSecretGroup(new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault"), -}, new NodeTypeVaultCertificate[] -{ -new NodeTypeVaultCertificate(new Uri("https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c"), "My") -})}, - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -ForceUpdateTag = "v.1.0", -IsAutomaticUpgradeEnabled = true, -SetupOrder = {VmssExtensionSetupOrder.BeforeSFRuntime}, -}}, - UserAssignedIdentities = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"), new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2") }, - IsStateless = true, - HasMultiplePlacementGroups = true, - FrontendConfigurations = {new NodeTypeFrontendConfiguration -{ -LoadBalancerBackendAddressPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool"), -LoadBalancerInboundNatPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"), -ApplicationGatewayBackendAddressPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"), -}}, - AdditionalDataDisks = { new NodeTypeVmssDataDisk(1, 256, ServiceFabricManagedDataDiskType.StandardSsdLrs, "F"), new NodeTypeVmssDataDisk(2, 150, ServiceFabricManagedDataDiskType.PremiumLrs, "G") }, - IsEncryptionAtHostEnabled = true, - IsAcceleratedNetworkingEnabled = true, - UseDefaultPublicLoadBalancer = true, - IsOverProvisioningEnabled = false, - IsSpotVm = true, - UseEphemeralOSDisk = true, - SpotRestoreTimeout = "PT30M", - EvictionPolicy = SpotNodeVmEvictionPolicyType.Deallocate, - SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), - VmSetupActions = { VmSetupAction.EnableContainers, VmSetupAction.EnableHyperV }, - SecurityType = ServiceFabricManagedClusterSecurityType.TrustedLaunch, - IsSecureBootEnabled = true, - IsNodePublicIPEnabled = true, - IsNodePublicIPv6Enabled = true, - NatGatewayId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway"), - ServiceArtifactReferenceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile"), - DscpConfigurationId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig"), - AdditionalNetworkInterfaceConfigurations = {new AdditionalNetworkInterfaceConfiguration("nic-1", new ServiceFabricManagedClusterIPConfiguration[] -{ -new ServiceFabricManagedClusterIPConfiguration("ipconfig-1") -{ -ApplicationGatewayBackendAddressPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"), -}}, -LoadBalancerBackendAddressPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool"), -}}, -LoadBalancerInboundNatPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"), -}}, -SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), -PrivateIPAddressVersion = ServiceFabricManagedClusterPrivateIPAddressVersion.IPv4, -PublicIPAddressConfiguration = new ServiceFabricManagedClusterPublicIPAddressConfiguration("publicip-1") -{ -IPTags = {new ManagedClusterIPTag("RoutingPreference", "Internet")}, -PublicIPAddressVersion = ServiceFabricManagedClusterPublicIPAddressVersion.IPv4, -}, -} -}) -{ -EnableAcceleratedNetworking = true, -DscpConfigurationId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig"), -}}, - ComputerNamePrefix = "BE", - VmApplications = {new ServiceFabricManagedVmApplication(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0")) -{ -ConfigurationReference = new Uri("https://mystorageaccount.blob.core.windows.net/containername/blobname"), -EnableAutomaticUpgrade = true, -Order = 1, -VmGalleryTags = "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}", -TreatFailureAsDeploymentFailure = false, -}}, - }; + string nodeTypeName = "BE"; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -229,10 +89,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() + public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + // this example is just showing the usage of "NodeType_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(); @@ -252,17 +112,7 @@ public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -275,10 +125,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() + public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json + // this example is just showing the usage of "NodeType_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(); @@ -298,25 +148,7 @@ public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServi // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -}}, - IsStateless = true, - HasMultiplePlacementGroups = true, - IsEncryptionAtHostEnabled = true, - UseTempDataDisk = true, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -329,10 +161,10 @@ public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServi [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() + public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationStateless_example.json + // this example is just showing the usage of "NodeType_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(); @@ -352,14 +184,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImageResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC"), - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -372,10 +197,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() + public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json + // this example is just showing the usage of "NodeType_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(); @@ -395,22 +220,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.StandardSsdLrs, - PlacementProperties = { }, - Capacities = { }, - VmSize = "Standard_D8s_v3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2019-Datacenter", - VmImageVersion = "latest", - Zones = { "1" }, - HostGroupId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup", - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -423,10 +233,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() + public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperation_example_max.json + // this example is just showing the usage of "NodeType_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(); @@ -445,15 +255,8 @@ public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() ServiceFabricManagedNodeTypeCollection collection = serviceFabricManagedCluster.GetServiceFabricManagedNodeTypes(); // invoke the operation - string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmSharedGalleryImageId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest"), - }; + string nodeTypeName = "BE-testResourceGroup-testRegion-test"; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -466,10 +269,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() + public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperation_example_min.json + // this example is just showing the usage of "NodeType_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(); @@ -489,23 +292,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImagePublisher = "testpublisher", - VmImageOffer = "windows_2022_test", - VmImageSku = "win_2022_test_20_10_gen2", - VmImageVersion = "latest", - VmImagePlan = new VmImagePlan - { - Name = "win_2022_test_20_10_gen2", - Product = "windows_2022_test", - Publisher = "testpublisher", - }, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -520,8 +307,8 @@ public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() [Ignore("Only validating compilation of examples")] public async Task Get_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -554,8 +341,8 @@ public async Task Get_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNodeTypeOfTheSpecifiedManagedCluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json - // this example is just showing the usage of "NodeTypes_ListByManagedClusters" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeListOperation_example.json + // this example is just showing the usage of "NodeType_ListByManagedClusters" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -590,8 +377,8 @@ public async Task GetAll_ListNodeTypeOfTheSpecifiedManagedCluster() [Ignore("Only validating compilation of examples")] public async Task Exists_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -620,8 +407,8 @@ public async Task Exists_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs index d2d06d2fa684..4b8aed16fc49 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedNodeTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -51,8 +51,8 @@ public async Task Get_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json - // this example is just showing the usage of "NodeTypes_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeDeleteOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -76,10 +76,10 @@ public async Task Delete_DeleteANodeType() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_PatchANodeType() + public async Task Update_PatchANodeTypeWhileAutoScaling() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json - // this example is just showing the usage of "NodeTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json + // this example is just showing the usage of "NodeType_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(); @@ -102,6 +102,11 @@ public async Task Update_PatchANodeType() { ["a"] = "b" }, + Sku = new NodeTypeSku(10) + { + Name = "Standard_S0", + Tier = "Standard", + }, }; ArmOperation lro = await serviceFabricManagedNodeType.UpdateAsync(WaitUntil.Completed, patch); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -115,10 +120,10 @@ public async Task Update_PatchANodeType() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_PatchANodeTypeWhileAutoScaling() + public async Task Update_PatchANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json - // this example is just showing the usage of "NodeTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePatchOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -141,11 +146,6 @@ public async Task Update_PatchANodeTypeWhileAutoScaling() { ["a"] = "b" }, - Sku = new NodeTypeSku(10) - { - Name = "Standard_S0", - Tier = "Standard", - }, }; ArmOperation lro = await serviceFabricManagedNodeType.UpdateAsync(WaitUntil.Completed, patch); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -159,10 +159,41 @@ public async Task Update_PatchANodeTypeWhileAutoScaling() [Test] [Ignore("Only validating compilation of examples")] - public async Task Restart_RestartNodes() + public async Task Deallocate_DeallocateNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json - // this example is just showing the usage of "NodeTypes_Restart" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/DeallocateNodes_example.json + // this example is just showing the usage of "NodeTypes_Deallocate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent + { + Nodes = { "BE_0", "BE_1" }, + }; + await serviceFabricManagedNodeType.DeallocateAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DeleteNode_DeleteNodes() + { + // Generated from example definition: 2025-03-01-preview/DeleteNodes_example.json + // this example is just showing the usage of "NodeTypes_DeleteNode" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -183,7 +214,69 @@ public async Task Restart_RestartNodes() { Nodes = { "BE_0", "BE_3" }, }; - await serviceFabricManagedNodeType.RestartAsync(WaitUntil.Completed, content); + await serviceFabricManagedNodeType.DeleteNodeAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Redeploy_RedeployAllNodesByUpgradeDomain() + { + // Generated from example definition: 2025-03-01-preview/RedeployNodes_UD_example.json + // this example is just showing the usage of "NodeTypes_Redeploy" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent + { + UpdateType = ServiceFabricManagedClusterUpdateType.ByUpgradeDomain, + }; + await serviceFabricManagedNodeType.RedeployAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Redeploy_RedeployNodes() + { + // Generated from example definition: 2025-03-01-preview/RedeployNodes_example.json + // this example is just showing the usage of "NodeTypes_Redeploy" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent + { + Nodes = { "BE_0", "BE_1" }, + }; + await serviceFabricManagedNodeType.RedeployAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } @@ -192,7 +285,7 @@ public async Task Restart_RestartNodes() [Ignore("Only validating compilation of examples")] public async Task Reimage_ReimageAllNodesByUpgradeDomain() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json + // Generated from example definition: 2025-03-01-preview/ReimageNodes_UD_example.json // this example is just showing the usage of "NodeTypes_Reimage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -223,7 +316,7 @@ public async Task Reimage_ReimageAllNodesByUpgradeDomain() [Ignore("Only validating compilation of examples")] public async Task Reimage_ReimageNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json + // Generated from example definition: 2025-03-01-preview/ReimageNodes_example.json // this example is just showing the usage of "NodeTypes_Reimage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,10 +345,10 @@ public async Task Reimage_ReimageNodes() [Test] [Ignore("Only validating compilation of examples")] - public async Task DeleteNode_DeleteNodes() + public async Task Restart_RestartNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json - // this example is just showing the usage of "NodeTypes_DeleteNode" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/RestartNodes_example.json + // this example is just showing the usage of "NodeTypes_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -276,7 +369,38 @@ public async Task DeleteNode_DeleteNodes() { Nodes = { "BE_0", "BE_3" }, }; - await serviceFabricManagedNodeType.DeleteNodeAsync(WaitUntil.Completed, content); + await serviceFabricManagedNodeType.RestartAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartNodes() + { + // Generated from example definition: 2025-03-01-preview/StartNodes_example.json + // this example is just showing the usage of "NodeTypes_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent + { + Nodes = { "BE_0", "BE_1" }, + }; + await serviceFabricManagedNodeType.StartAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } @@ -285,8 +409,8 @@ public async Task DeleteNode_DeleteNodes() [Ignore("Only validating compilation of examples")] public async Task GetAvailableSkus_ListANodeTypeSKUs() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json - // this example is just showing the usage of "NodeTypeSkus_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeSkusListOperation_example.json + // this example is just showing the usage of "NodeTypeSkus_GetAvailableSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs index 040de985dfa1..92ae1d6381cb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedServiceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAServiceWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json - // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePutOperation_example_max.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(); @@ -80,8 +80,8 @@ public async Task CreateOrUpdate_PutAServiceWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAServiceWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json - // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePutOperation_example_min.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(); @@ -120,8 +120,8 @@ public async Task CreateOrUpdate_PutAServiceWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.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(); @@ -155,8 +155,8 @@ public async Task Get_GetAService() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfServiceResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json - // this example is just showing the usage of "Services_ListByApplications" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceListOperation_example.json + // this example is just showing the usage of "ServiceResource_ListByApplications" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +192,8 @@ public async Task GetAll_GetAListOfServiceResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.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(); @@ -223,8 +223,8 @@ public async Task Exists_GetAService() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs index 9a829cfa3055..ea311b29c9f7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedServiceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.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(); @@ -52,8 +52,8 @@ public async Task Get_GetAService() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json - // this example is just showing the usage of "Services_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceDeleteOperation_example.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(); @@ -80,8 +80,8 @@ public async Task Delete_DeleteAService() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json - // this example is just showing the usage of "Services_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePatchOperation_example.json + // this example is just showing the usage of "ServiceResource_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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 180082f38b89..f42e4d2e394d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetServiceFabricManagedClusters_ListManagedClusters() + public async Task GetManagedClusterVersion_GetClusterVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json - // this example is just showing the usage of "ManagedClusters_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionGet_example.json + // this example is just showing the usage of "ManagedClusterVersion_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(); @@ -35,25 +35,20 @@ public async Task GetServiceFabricManagedClusters_ListManagedClusters() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (ServiceFabricManagedClusterResource item in subscriptionResource.GetServiceFabricManagedClustersAsync()) - { - // 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 - ServiceFabricManagedClusterData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + string clusterVersion = "7.2.477.9590"; + ServiceFabricManagedClusterVersion result = await subscriptionResource.GetManagedClusterVersionAsync(location, clusterVersion); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersion_GetClusterVersion() + public async Task GetManagedClusterVersions_ListClusterVersions() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json - // this example is just showing the usage of "ManagedClusterVersion_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionList_example.json + // this example is just showing the usage of "ManagedClusterVersion_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(); @@ -66,20 +61,22 @@ public async Task GetManagedClusterVersion_GetClusterVersion() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation + // invoke the operation and iterate over the result AzureLocation location = new AzureLocation("eastus"); - string clusterVersion = "7.2.477.9590"; - ServiceFabricManagedClusterVersion result = await subscriptionResource.GetManagedClusterVersionAsync(location, clusterVersion); + await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] public async Task GetManagedClusterVersionByEnvironment_GetClusterVersionByEnvironment() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json - // this example is just showing the usage of "ManagedClusterVersion_GetByEnvironment" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json + // this example is just showing the usage of "ManagedClusterVersion_GetManagedClusterVersionByEnvironment" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -103,10 +100,10 @@ public async Task GetManagedClusterVersionByEnvironment_GetClusterVersionByEnvir [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersions_ListClusterVersions() + public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEnvironment() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json - // this example is just showing the usage of "ManagedClusterVersion_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json + // this example is just showing the usage of "ManagedClusterVersion_ListByEnvironment" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -121,7 +118,8 @@ public async Task GetManagedClusterVersions_ListClusterVersions() // invoke the operation and iterate over the result AzureLocation location = new AzureLocation("eastus"); - await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsAsync(location)) + ManagedClusterVersionEnvironment environment = ManagedClusterVersionEnvironment.Windows; + await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsByEnvironmentAsync(location, environment)) { Console.WriteLine($"Succeeded: {item}"); } @@ -131,10 +129,10 @@ public async Task GetManagedClusterVersions_ListClusterVersions() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEnvironment() + public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json - // this example is just showing the usage of "ManagedClusterVersion_ListByEnvironment" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json + // this example is just showing the usage of "ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -147,23 +145,20 @@ public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEn ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation and iterate over the result + // invoke the operation AzureLocation location = new AzureLocation("eastus"); - ManagedClusterVersionEnvironment environment = ManagedClusterVersionEnvironment.Windows; - await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsByEnvironmentAsync(location, environment)) - { - Console.WriteLine($"Succeeded: {item}"); - } + string vmSize = "Standard_B1ls1"; + ServiceFabricManagedUnsupportedVmSize result = await subscriptionResource.GetManagedUnsupportedVmSizeAsync(location, vmSize); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json - // this example is just showing the usage of "managedUnsupportedVMSizes_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json + // this example is just showing the usage of "ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -188,10 +183,10 @@ public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() + public async Task GetServiceFabricManagedClusters_ListManagedClusters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json - // this example is just showing the usage of "managedUnsupportedVMSizes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -204,12 +199,17 @@ public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation - AzureLocation location = new AzureLocation("eastus"); - string vmSize = "Standard_B1ls1"; - ServiceFabricManagedUnsupportedVmSize result = await subscriptionResource.GetManagedUnsupportedVmSizeAsync(location, vmSize); + // invoke the operation and iterate over the result + await foreach (ServiceFabricManagedClusterResource item in subscriptionResource.GetServiceFabricManagedClustersAsync()) + { + // 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 + ServiceFabricManagedClusterData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ManagedClusterTests.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ManagedClusterTests.cs index 647606c22fda..8c9cc765a261 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ManagedClusterTests.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ManagedClusterTests.cs @@ -1,6 +1,7 @@ // 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; @@ -24,7 +25,6 @@ public ManagedClusterTests(bool isAsync) : base(isAsync) [Test] [RecordedTest] - [Ignore("Nee re-record")] public async Task BasicClusterTestAsync() { resourceGroupResource = await CreateResourceGroupWithTag(); @@ -48,5 +48,103 @@ public async Task BasicClusterTestAsync() ServiceFabricManagedClusterData resourceData = serviceFabricManagedCluster.Data; Assert.AreEqual(clusterName, resourceData.Name); } + + [Test] + [RecordedTest] + public async Task ListClusterTestAsync() + { + resourceGroupResource = await CreateResourceGroupWithTag(); + + clusterName = Recording.GenerateAssetName("sfmctestclusternet"); + clusterCollection = resourceGroupResource.GetServiceFabricManagedClusters(); + + ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("westus")) + { + DnsName = clusterName, + AdminUserName = "Myusername4", + AdminPassword = "Sfmcpass5!", + Sku = new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Standard), + ClientConnectionPort = 19000, + HttpGatewayConnectionPort = 19080 + }; + data.Tags.Add(new KeyValuePair("SFRP.EnableDiagnosticMI", "true")); + + serviceFabricManagedCluster = (await clusterCollection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data)).Value; + + ServiceFabricManagedClusterData resourceData = serviceFabricManagedCluster.Data; + Assert.AreEqual(clusterName, resourceData.Name); + + var clustersList = clusterCollection.GetAllAsync(); + var clusterCount = 0; + await foreach (ServiceFabricManagedClusterResource cluster in clustersList) + { + clusterCount++; + } + + Assert.AreEqual(clusterCount, 1); + } + + [Test] + [RecordedTest] + public async Task ClusterFaultSimulation() + { + // CreateOrUpdate + resourceGroupResource = await CreateResourceGroupWithTag(); + + serviceFabricManagedCluster = await CreateServiceFabricManagedClusterZoneResilient(resourceGroupResource, Recording.GenerateAssetName("sfmctest")); + + string primaryNodeTypeName = Recording.GenerateAssetName("node"); + var primaryNodeType = await CreateServiceFabricManagedNodeType(serviceFabricManagedCluster, primaryNodeTypeName, true); + + // Start Fault Simulation + FaultSimulationContent content = new ZoneFaultSimulationContent + { + Zones = { "2" }, + FaultKind = "Zone", + }; + + FaultSimulationContentWrapper faultSimulationContentWrapper = new FaultSimulationContentWrapper(content); + + try + { + var startFaultSimulationResult = (await serviceFabricManagedCluster.StartFaultSimulationAsync(WaitUntil.Completed, faultSimulationContentWrapper)).Value; + + Assert.AreEqual(startFaultSimulationResult.Status, FaultSimulationStatus.Active); + + // List Fault Simulation + var faultSimulationCount = 0; + var mostRecentSimulationId = ""; + + var listFaultSimulationResult = serviceFabricManagedCluster.GetFaultSimulationAsync(); + await foreach (FaultSimulation simulation in listFaultSimulationResult) + { + faultSimulationCount++; + mostRecentSimulationId = simulation.SimulationId; + } + + Assert.AreEqual(faultSimulationCount, 1); + Assert.AreEqual(startFaultSimulationResult.SimulationId, mostRecentSimulationId); + + // Get Fault Simulation + FaultSimulationIdContent faultSimulationIdContent = new FaultSimulationIdContent(startFaultSimulationResult.SimulationId); + var getFaultSimulationResult = (await serviceFabricManagedCluster.GetFaultSimulationAsync(faultSimulationIdContent)).Value; + + Assert.AreEqual(startFaultSimulationResult.SimulationId, getFaultSimulationResult.SimulationId); + Assert.AreEqual(startFaultSimulationResult.Details.ClusterId, getFaultSimulationResult.Details.ClusterId); + Assert.AreEqual(startFaultSimulationResult.StartOn, getFaultSimulationResult.StartOn); + Assert.AreEqual(startFaultSimulationResult.EndOn, getFaultSimulationResult.EndOn); + + // Stop Fault Simulation + var stopFaultSimulationResult = (await serviceFabricManagedCluster.StopFaultSimulationAsync(WaitUntil.Completed, faultSimulationIdContent)).Value; + + Assert.AreEqual(startFaultSimulationResult.SimulationId, stopFaultSimulationResult.SimulationId); + Assert.AreEqual(stopFaultSimulationResult.Status, FaultSimulationStatus.Done); + } + catch (Exception ex) + { + Console.WriteLine(content); + Console.WriteLine(ex); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedApplicationTests.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedApplicationTests.cs index 4e0aa8fffb81..e2c2f7305316 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedApplicationTests.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedApplicationTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -58,7 +58,6 @@ private async Task CreateServiceFabricM [RecordedTest] [PlaybackOnly("Need manually upload a .sfpkg file to StorageAccount")] - [Ignore("Nee re-record")] public async Task CreateOrUpdateExistGetGetAllDelete() { // CreateOrUpdate @@ -84,9 +83,9 @@ public async Task CreateOrUpdateExistGetGetAllDelete() Assert.IsFalse(flag); } + [RecordedTest] [TestCase(false)] - [PlaybackOnly("Need manually upload a .sfpkg file to StorageAccount")] - [Ignore("Nee re-record")] + [PlaybackOnlyAttribute("Need manually upload a .sfpkg file to StorageAccount")] //[TestCase(null)] // The HTTP method 'GET' is not supported at scope 'Microsoft.ServiceFabric/managedclusters/sfmctest1063/applications/application5675'. //[TestCase(true)] // The HTTP method 'GET' is not supported at scope 'Microsoft.ServiceFabric/managedclusters/sfmctest1063/applications/application5675'. public async Task AddRemoveTag(bool? useTagResource) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeTests.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeTests.cs index 4c3992ea5085..ccc60ce0f2c5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeTests.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -7,13 +7,16 @@ using System.Text; using System.Threading.Tasks; using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; +using NUnit.Framework.Constraints; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Tests { internal class ServiceFabricManagedNodeTypeTests : ServiceFabricManagedClustersManagementTestBase { + private ResourceGroupResource _resourceGroup; private ServiceFabricManagedClusterResource _cluster; private ServiceFabricManagedNodeTypeCollection _nodeTypeCollection; public ServiceFabricManagedNodeTypeTests(bool isAsync) : base(isAsync) @@ -23,15 +26,16 @@ public ServiceFabricManagedNodeTypeTests(bool isAsync) : base(isAsync) [SetUp] public async Task TestSetUp() { - var resourceGroup = await CreateResourceGroup(); - _cluster = await CreateServiceFabricManagedCluster(resourceGroup, Recording.GenerateAssetName("sfmctest")); - _nodeTypeCollection = _cluster.GetServiceFabricManagedNodeTypes(); + _resourceGroup = await CreateResourceGroup(); } [RecordedTest] public async Task CreateOrUpdateDelete() { // CreateOrUpdate + _cluster = await CreateServiceFabricManagedCluster(_resourceGroup, Recording.GenerateAssetName("sfmctest")); + _nodeTypeCollection = _cluster.GetServiceFabricManagedNodeTypes(); + string primaryNodeTypeName = Recording.GenerateAssetName("node"); string secondaryNodeTypeName = Recording.GenerateAssetName("node"); var primaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, primaryNodeTypeName, true); @@ -47,6 +51,9 @@ public async Task CreateOrUpdateDelete() [RecordedTest] public async Task ExistGetGetAll() { + _cluster = await CreateServiceFabricManagedCluster(_resourceGroup, Recording.GenerateAssetName("sfmctest")); + _nodeTypeCollection = _cluster.GetServiceFabricManagedNodeTypes(); + string nodeTypeName = Recording.GenerateAssetName("node"); var nodeType = await CreateServiceFabricManagedNodeType(_cluster, nodeTypeName, true); @@ -64,6 +71,100 @@ public async Task ExistGetGetAll() ValidatePurviewAccount(list.FirstOrDefault().Data, nodeTypeName); } + [RecordedTest] + public async Task NodeTypesActions() + { + // CreateOrUpdate + _cluster = await CreateServiceFabricManagedCluster(_resourceGroup, Recording.GenerateAssetName("sfmctest")); + + string primaryNodeTypeName = Recording.GenerateAssetName("node"); + string secondaryNodeTypeName = Recording.GenerateAssetName("node"); + var primaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, primaryNodeTypeName, true); + var secondaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, secondaryNodeTypeName, false); + ValidatePurviewAccount(primaryNodeType.Data, primaryNodeTypeName); + ValidatePurviewAccount(secondaryNodeType.Data, secondaryNodeTypeName); + + // Actions + NodeTypeActionContent content = new NodeTypeActionContent + { + Nodes = { String.Format("{0}_1", secondaryNodeTypeName), String.Format("{0}_3", secondaryNodeTypeName) }, + }; + + // Deallocate + await secondaryNodeType.DeallocateAsync(WaitUntil.Completed, content); + + // Start/Allocate + await secondaryNodeType.StartAsync(WaitUntil.Completed, content); + + content.UpdateType = ServiceFabricManagedClusterUpdateType.ByUpgradeDomain; + // Redeploy + await secondaryNodeType.RedeployAsync(WaitUntil.Completed, content); + } + + [RecordedTest] + public async Task NodeTypeFaultSimulationTest() + { + // CreateOrUpdate + _cluster = await CreateServiceFabricManagedClusterZoneResilient(_resourceGroup, Recording.GenerateAssetName("sfmctest")); + + string primaryNodeTypeName = Recording.GenerateAssetName("node"); + string secondaryNodeTypeName = Recording.GenerateAssetName("node"); + var primaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, primaryNodeTypeName, true); + var secondaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, secondaryNodeTypeName, false); + ValidatePurviewAccount(primaryNodeType.Data, primaryNodeTypeName); + ValidatePurviewAccount(secondaryNodeType.Data, secondaryNodeTypeName); + + // Start Fault Simulation + FaultSimulationContent content = new ZoneFaultSimulationContent + { + Zones = { "2" }, + FaultKind = "Zone", + }; + + FaultSimulationContentWrapper faultSimulationContentWrapper = new FaultSimulationContentWrapper(content); + + try + { + var startFaultSimulationResult = (await secondaryNodeType.StartFaultSimulationAsync(WaitUntil.Completed, faultSimulationContentWrapper)).Value; + + Assert.AreEqual(startFaultSimulationResult.Status, FaultSimulationStatus.Active); + + // List Fault Simulation + var faultSimulationCount = 0; + var mostRecentSimulationId = ""; + + var listFaultSimulationResult = secondaryNodeType.GetFaultSimulationAsync(); + await foreach (FaultSimulation simulation in listFaultSimulationResult) + { + faultSimulationCount++; + mostRecentSimulationId = simulation.SimulationId; + } + + Assert.AreEqual(faultSimulationCount, 1); + Assert.AreEqual(startFaultSimulationResult.SimulationId, mostRecentSimulationId); + + // Get Fault Simulation + FaultSimulationIdContent faultSimulationIdContent = new FaultSimulationIdContent(startFaultSimulationResult.SimulationId); + var getFaultSimulationResult = (await secondaryNodeType.GetFaultSimulationAsync(faultSimulationIdContent)).Value; + + Assert.AreEqual(startFaultSimulationResult.SimulationId, getFaultSimulationResult.SimulationId); + Assert.AreEqual(startFaultSimulationResult.Details.ClusterId, getFaultSimulationResult.Details.ClusterId); + Assert.AreEqual(startFaultSimulationResult.StartOn, getFaultSimulationResult.StartOn); + Assert.AreEqual(startFaultSimulationResult.EndOn, getFaultSimulationResult.EndOn); + + // Stop Fault Simulation + var stopFaultSimulationResult = (await secondaryNodeType.StopFaultSimulationAsync(WaitUntil.Completed, faultSimulationIdContent)).Value; + + Assert.AreEqual(startFaultSimulationResult.SimulationId, stopFaultSimulationResult.SimulationId); + Assert.AreEqual(stopFaultSimulationResult.Status, FaultSimulationStatus.Done); + } + catch (Exception ex) + { + Console.WriteLine(content); + Console.WriteLine(ex); + } + } + private void ValidatePurviewAccount(ServiceFabricManagedNodeTypeData nodeType, string nodeTypeName) { Assert.IsNotNull(nodeType); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagerNodeTypeUpdateTest.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeUpdateTests.cs similarity index 69% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagerNodeTypeUpdateTest.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeUpdateTests.cs index 1114505ca74d..1f98edf2ee8f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagerNodeTypeUpdateTest.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeUpdateTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -14,14 +14,14 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Tests { - internal class ServiceFabricManagerNodeTypeUpdateTest : ServiceFabricManagedClustersManagementTestBase + internal class ServiceFabricManagedNodeTypeUpdateTests : ServiceFabricManagedClustersManagementTestBase { public ServiceFabricManagedClusterCollection clusterCollection { get; set; } public string clusterName; private ResourceGroupResource resourceGroupResource; public ServiceFabricManagedClusterResource serviceFabricManagedCluster; private ServiceFabricManagedNodeTypeResource serviveFabricManagedClusterNodeType; - public ServiceFabricManagerNodeTypeUpdateTest(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) + public ServiceFabricManagedNodeTypeUpdateTests(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) { } @@ -66,12 +66,11 @@ public async Task TestSetUp() this.serviveFabricManagedClusterNodeType = (await nodeTypeCollection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, nodeTypeData)).Value; } - [Test] - [Ignore("Nee re-record")] - public async Task UpdateTest() + [RecordedTest] + public async Task UpdateTagsTest() { //Update - var updateNodetype_lro = await this.serviveFabricManagedClusterNodeType.UpdateAsync(new ServiceFabricManagedNodeTypePatch() + var updateNodetype_lro = await this.serviveFabricManagedClusterNodeType.UpdateAsync(WaitUntil.Completed, new ServiceFabricManagedNodeTypePatch() { Tags = { @@ -79,7 +78,26 @@ public async Task UpdateTest() ["UpdateKey2"] = "UpdateValue2", } }); - var updateNodetype = updateNodetype_lro.Value; + + ServiceFabricManagedNodeTypeResource updateNodetype = updateNodetype_lro.Value; + var nodeTypeTagsDataValues = updateNodetype.Data.Tags; + Assert.AreEqual(nodeTypeTagsDataValues["UpdateKey1"], "UpdateValue1"); + Assert.AreEqual(nodeTypeTagsDataValues["UpdateKey2"], "UpdateValue2"); + } + + [RecordedTest] + public async Task UpdateCapacityTest() + { + var targetCount = 7; + + //Update + var updateNodetype_lro = await this.serviveFabricManagedClusterNodeType.UpdateAsync(WaitUntil.Completed, new ServiceFabricManagedNodeTypePatch() + { + Sku = new NodeTypeSku(targetCount) + }); + + ServiceFabricManagedNodeTypeResource updateNodetype = updateNodetype_lro.Value; + Assert.AreEqual(updateNodetype.Data.Sku.Capacity, targetCount); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/ServiceFabricManagedClustersManagementTestBase.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/ServiceFabricManagedClustersManagementTestBase.cs index d33eb2e67833..81efbeb81e59 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/ServiceFabricManagedClustersManagementTestBase.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/ServiceFabricManagedClustersManagementTestBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -38,7 +38,7 @@ protected ServiceFabricManagedClustersManagementTestBase(bool isAsync) public async Task CreateCommonClient() { ArmClientOptions options = new ArmClientOptions(); - options.SetApiVersion(UserAssignedIdentityResource.ResourceType, "2018-11-30"); + options.SetApiVersion(UserAssignedIdentityResource.ResourceType, "2024-11-01-preview"); Client = GetArmClient(options); DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); @@ -95,6 +95,32 @@ protected async Task CreateServiceFabricMan return clusterLro.Value; } + protected async Task CreateServiceFabricManagedClusterZoneResilient(ResourceGroupResource resourceGroup, string clusterName) + { + string dnsName = Recording.GenerateAssetName("netsdk"); + var data = new ServiceFabricManagedClusterData(DefaultLocation) + { + Sku = new ServiceFabricManagedClustersSku("Standard"), + DnsName = dnsName, + ClientConnectionPort = 19000, + HttpGatewayConnectionPort = 19080, + ClusterUpgradeMode = ManagedClusterUpgradeMode.Automatic, + HasZoneResiliency = true, + AdminUserName = "vmadmin", + AdminPassword = "Password123!@#", + Clients = + { + new ManagedClusterClientCertificate(true) + { + Thumbprint = BinaryData.FromString("\"123BDACDCDFB2C7B250192C6078E47D1E1DB119B\""), + } + } + }; + data.Tags.Add(new KeyValuePair("SFRP.EnableDiagnosticMI", "true")); + var clusterLro = await resourceGroup.GetServiceFabricManagedClusters().CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data); + return clusterLro.Value; + } + protected async Task CreateServiceFabricManagedNodeType(ServiceFabricManagedClusterResource cluster, string nodeTypeName, bool isPrimaryNode) { var data = new ServiceFabricManagedNodeTypeData() diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml new file mode 100644 index 000000000000..207788c135e3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management +commit: d205bf6b2a57fb9d8c6245eee887a6dfd807049d +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Azure.ResourceManager.ServiceNetworking.sln b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Azure.ResourceManager.ServiceNetworking.sln index 8911ba1e433a..537f2d38a9f8 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Azure.ResourceManager.ServiceNetworking.sln +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Azure.ResourceManager.ServiceNetworking.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Servi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.ServiceNetworking.Tests", "tests\Azure.ResourceManager.ServiceNetworking.Tests.csproj", "{642D3109-0E17-49BE-B4D7-A3EB05C86948}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.ServiceNetworking.Samples", "samples\Azure.ResourceManager.ServiceNetworking.Samples.csproj", "{373B6D19-FE1D-45C2-87E3-5DE7A1B78DD7}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Azure.ResourceManager.ServiceNetworking.Samples.csproj b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Azure.ResourceManager.ServiceNetworking.Samples.csproj deleted file mode 100644 index bd9e545375dc..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Azure.ResourceManager.ServiceNetworking.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyCollection.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyCollection.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyCollection.cs diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyResource.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyResource.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyResource.cs diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerAssociationCollection.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationCollection.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerAssociationCollection.cs diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerAssociationResource.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationResource.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerAssociationResource.cs diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerCollection.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerCollection.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerCollection.cs diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerFrontendCollection.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendCollection.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerFrontendCollection.cs diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerFrontendResource.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendResource.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerFrontendResource.cs diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerResource.cs similarity index 100% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerResource.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tests/Generated/Samples/Sample_TrafficControllerResource.cs diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln index 6afedab8de5d..c5c4c89dc6b5 100644 --- a/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln @@ -7,8 +7,6 @@ Project("{F903E55E-0FDE-4855-AC34-AFAC1F7FC419}") = "Azure.ResourceManager.SiteM EndProject Project("{F903E55E-0FDE-4855-AC34-AFAC1F7FC419}") = "Azure.ResourceManager.SiteManager.Tests", "tests\Azure.ResourceManager.SiteManager.Tests.csproj", "{39B18B76-C158-40EB-B1F7-95ED36BAC834}" EndProject -Project("{F903E55E-0FDE-4855-AC34-AFAC1F7FC419}") = "Azure.ResourceManager.SiteManager.Samples", "samples\Azure.ResourceManager.SiteManager.Samples.csproj", "{87DBDED0-0F32-40C0-B899-3CC2451AB541}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj b/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj deleted file mode 100644 index 8807be9e8794..000000000000 --- a/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Generated/Samples/Sample_EdgeSiteCollection.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/tests/Generated/Samples/Sample_EdgeSiteCollection.cs similarity index 100% rename from sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Generated/Samples/Sample_EdgeSiteCollection.cs rename to sdk/sitemanager/Azure.ResourceManager.SiteManager/tests/Generated/Samples/Sample_EdgeSiteCollection.cs diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Generated/Samples/Sample_EdgeSiteResource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/tests/Generated/Samples/Sample_EdgeSiteResource.cs similarity index 100% rename from sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Generated/Samples/Sample_EdgeSiteResource.cs rename to sdk/sitemanager/Azure.ResourceManager.SiteManager/tests/Generated/Samples/Sample_EdgeSiteResource.cs diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/sitemanager/Azure.ResourceManager.SiteManager/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/tests/Generated/Samples/Sample_TenantResourceExtensions.cs similarity index 100% rename from sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Generated/Samples/Sample_TenantResourceExtensions.cs rename to sdk/sitemanager/Azure.ResourceManager.SiteManager/tests/Generated/Samples/Sample_TenantResourceExtensions.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/Azure.ResourceManager.StandbyPool.sln b/sdk/standbypool/Azure.ResourceManager.StandbyPool/Azure.ResourceManager.StandbyPool.sln index cb00ecbcae49..443a0f5c452b 100644 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/Azure.ResourceManager.StandbyPool.sln +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/Azure.ResourceManager.StandbyPool.sln @@ -7,8 +7,6 @@ Project("{B0561A8D-1292-4D56-B8FC-2B4E2C8CFE3D}") = "Azure.ResourceManager.Stand EndProject Project("{B0561A8D-1292-4D56-B8FC-2B4E2C8CFE3D}") = "Azure.ResourceManager.StandbyPool.Tests", "tests\Azure.ResourceManager.StandbyPool.Tests.csproj", "{FEC17FD3-550C-43BF-998D-0317C64355D5}" EndProject -Project("{B0561A8D-1292-4D56-B8FC-2B4E2C8CFE3D}") = "Azure.ResourceManager.StandbyPool.Samples", "samples\Azure.ResourceManager.StandbyPool.Samples.csproj", "{9EA2CA60-2B8C-4E0F-884D-76AD9D49A0B7}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Azure.ResourceManager.StandbyPool.Samples.csproj b/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Azure.ResourceManager.StandbyPool.Samples.csproj deleted file mode 100644 index df18fcff8dfc..000000000000 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Azure.ResourceManager.StandbyPool.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyContainerGroupPoolCollection.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyContainerGroupPoolCollection.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyContainerGroupPoolCollection.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyContainerGroupPoolCollection.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyContainerGroupPoolResource.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyContainerGroupPoolResource.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyContainerGroupPoolResource.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyContainerGroupPoolResource.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyContainerGroupPoolRuntimeViewCollection.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyContainerGroupPoolRuntimeViewCollection.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyContainerGroupPoolRuntimeViewCollection.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyContainerGroupPoolRuntimeViewCollection.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyContainerGroupPoolRuntimeViewResource.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyContainerGroupPoolRuntimeViewResource.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyContainerGroupPoolRuntimeViewResource.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyContainerGroupPoolRuntimeViewResource.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachineCollection.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachineCollection.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachineCollection.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachineCollection.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachinePoolCollection.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachinePoolCollection.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachinePoolCollection.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachinePoolCollection.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachinePoolResource.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachinePoolResource.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachinePoolResource.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachinePoolResource.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachinePoolRuntimeViewCollection.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachinePoolRuntimeViewCollection.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachinePoolRuntimeViewCollection.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachinePoolRuntimeViewCollection.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachinePoolRuntimeViewResource.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachinePoolRuntimeViewResource.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachinePoolRuntimeViewResource.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachinePoolRuntimeViewResource.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachineResource.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachineResource.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_StandbyVirtualMachineResource.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_StandbyVirtualMachineResource.cs diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/standbypool/Azure.ResourceManager.StandbyPool/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/standbypool/Azure.ResourceManager.StandbyPool/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/storage/Azure.ResourceManager.Storage/CHANGELOG.md b/sdk/storage/Azure.ResourceManager.Storage/CHANGELOG.md index 4d7f4370337e..704ddf04bdb1 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/CHANGELOG.md +++ b/sdk/storage/Azure.ResourceManager.Storage/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.5.0-beta.1 (Unreleased) +## 1.4.3 (2025-06-24) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Updated per swagger change for StorageAction GA ## 1.4.2 (2025-04-25) diff --git a/sdk/storage/Azure.ResourceManager.Storage/assets.json b/sdk/storage/Azure.ResourceManager.Storage/assets.json index 4e1536944d1f..3cf3c17c9de7 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/assets.json +++ b/sdk/storage/Azure.ResourceManager.Storage/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.ResourceManager.Storage", - "Tag": "net/storage/Azure.ResourceManager.Storage_b706bb7184" + "Tag": "net/storage/Azure.ResourceManager.Storage_a0a0da9bca" } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Azure.ResourceManager.Storage.csproj b/sdk/storage/Azure.ResourceManager.Storage/src/Azure.ResourceManager.Storage.csproj index 9abb108bf65e..80559d9398d0 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Azure.ResourceManager.Storage.csproj +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Azure.ResourceManager.Storage.csproj @@ -1,6 +1,6 @@ - 1.5.0-beta.1 + 1.4.3 1.4.2 Azure.ResourceManager.Storage diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/Models/ExecutionTriggerParameters.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/Models/ExecutionTriggerParameters.cs index 2020b62c9691..e6616b352e00 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/Models/ExecutionTriggerParameters.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/Models/ExecutionTriggerParameters.cs @@ -55,7 +55,7 @@ public ExecutionTriggerParameters() /// Run interval of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'. /// Run interval unit of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'. /// When to end task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'. - /// When to start task execution. This is an optional field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'. + /// When to start task execution. This is a required field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'. /// Keeps track of any properties unknown to the library. internal ExecutionTriggerParameters(DateTimeOffset? startFrom, int? interval, ExecutionIntervalUnit? intervalUnit, DateTimeOffset? endBy, DateTimeOffset? startOn, IDictionary serializedAdditionalRawData) { @@ -79,7 +79,7 @@ internal ExecutionTriggerParameters(DateTimeOffset? startFrom, int? interval, Ex /// When to end task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'. [WirePath("endBy")] public DateTimeOffset? EndBy { get; set; } - /// When to start task execution. This is an optional field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'. + /// When to start task execution. This is a required field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'. [WirePath("startOn")] public DateTimeOffset? StartOn { get; set; } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentCollection.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentCollection.cs index fc83bd6c35ca..462c8f3d95a7 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentCollection.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentCollection.cs @@ -88,7 +88,7 @@ public virtual async Task> CreateOrU try { var response = await _storageTaskAssignmentRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageTaskAssignmentName, data, cancellationToken).ConfigureAwait(false); - var operation = new StorageArmOperation(new StorageTaskAssignmentOperationSource(Client), _storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageTaskAssignmentName, data).Request, response, OperationFinalStateVia.Location); + var operation = new StorageArmOperation(new StorageTaskAssignmentOperationSource(Client), _storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageTaskAssignmentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn try { var response = _storageTaskAssignmentRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageTaskAssignmentName, data, cancellationToken); - var operation = new StorageArmOperation(new StorageTaskAssignmentOperationSource(Client), _storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageTaskAssignmentName, data).Request, response, OperationFinalStateVia.Location); + var operation = new StorageArmOperation(new StorageTaskAssignmentOperationSource(Client), _storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageTaskAssignmentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentResource.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentResource.cs index ffada06c45b5..624fc3adcfdd 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentResource.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentResource.cs @@ -204,7 +204,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _storageTaskAssignmentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new StorageArmOperation(_storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new StorageArmOperation(_storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -246,7 +246,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _storageTaskAssignmentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new StorageArmOperation(_storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new StorageArmOperation(_storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -292,7 +292,7 @@ public virtual async Task> UpdateAsy try { var response = await _storageTaskAssignmentRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new StorageArmOperation(new StorageTaskAssignmentOperationSource(Client), _storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var operation = new StorageArmOperation(new StorageTaskAssignmentOperationSource(Client), _storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -338,7 +338,7 @@ public virtual ArmOperation Update(WaitUntil wait try { var response = _storageTaskAssignmentRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new StorageArmOperation(new StorageTaskAssignmentOperationSource(Client), _storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var operation = new StorageArmOperation(new StorageTaskAssignmentOperationSource(Client), _storageTaskAssignmentClientDiagnostics, Pipeline, _storageTaskAssignmentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/autorest.md b/sdk/storage/Azure.ResourceManager.Storage/src/autorest.md index 9cabca998909..2dd7fd95a412 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/autorest.md +++ b/sdk/storage/Azure.ResourceManager.Storage/src/autorest.md @@ -6,7 +6,7 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true csharp: true namespace: Azure.ResourceManager.Storage -require: https://github.com/Azure/azure-rest-api-specs/blob/63d03a8f8c51576551e0fc621a97cef857970ab5/specification/storage/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/2219e4e4e0409bcb88a2b82e8febe1a3baecaf18/specification/storage/resource-manager/readme.md #tag: package-2024-01 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/StorageTaskAssignmentTests.cs b/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/StorageTaskAssignmentTests.cs index e92b5afbeade..7641a63ebdc9 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/StorageTaskAssignmentTests.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/tests/Tests/StorageTaskAssignmentTests.cs @@ -33,7 +33,7 @@ public async Task CreateStorageAccount() string accountName = await CreateValidAccountNameAsync("teststoragemgmt"); StorageAccountCollection storageAccountCollection = _resourceGroup.GetStorageAccounts(); - _storageAccount = (await storageAccountCollection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, GetDefaultStorageAccountParameters(sku: new StorageSku(StorageSkuName.StandardLrs), kind: StorageKind.StorageV2, location: "eastus2euap"))).Value; + _storageAccount = (await storageAccountCollection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, GetDefaultStorageAccountParameters(sku: new StorageSku(StorageSkuName.StandardLrs), kind: StorageKind.StorageV2, location: "eastus2"))).Value; _storageTaskAssignmentCollection = _storageAccount.GetStorageTaskAssignments(); } @@ -58,7 +58,7 @@ private async Task CreateStorageTaskAsync() string storageTaskName = Recording.GenerateAssetName("testtask"); ResourceIdentifier storageTaskId = new ResourceIdentifier($"{_resourceGroup.Id}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}"); - var input = new GenericResourceData("eastus2euap") + var input = new GenericResourceData("eastus2") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.None), Properties = BinaryData.FromString("{\r\n \"action\": {\r\n \"if\": {\r\n \"condition\": \"[[equals(AccessTier, 'Cool')]]\",\r\n \"operations\": [\r\n {\r\n \"name\": \"DeleteBlob\",\r\n \"onSuccess\": \"continue\",\r\n \"onFailure\": \"break\"\r\n }\r\n ]\r\n }\r\n },\r\n \"enabled\": true,\r\n \"description\": \"test description\"\r\n }") @@ -72,7 +72,7 @@ private async Task CreateStorageTaskAsync() public async Task CreateUpdateGetDeleteTaskAssignement() { //create TaskAssignement - string taskAssignementName = Recording.GenerateAssetName("taskAssignement1"); + string taskAssignementName = Recording.GenerateAssetName("taskassignement1"); StorageTaskAssignmentProperties assignmentProperties = new StorageTaskAssignmentProperties( _storageTaskId, false, @@ -85,10 +85,10 @@ public async Task CreateUpdateGetDeleteTaskAssignement() new ExecutionTrigger( ExecutionTriggerType.OnSchedule, new ExecutionTriggerParameters( - new DateTimeOffset(2024, 7, 1, 1, 1, 1, new TimeSpan()), + new DateTimeOffset(2025, 7, 1, 1, 1, 1, new TimeSpan()), 10, ExecutionIntervalUnit.Days, - new DateTimeOffset(2024, 8, 1, 1, 1, 1, new TimeSpan()), + new DateTimeOffset(2025, 8, 1, 1, 1, 1, new TimeSpan()), null, null)), null), @@ -202,8 +202,8 @@ public async Task CreateUpdateGetDeleteTaskAssignement() public async Task ListStorageTaskAssignments() { //create TaskAssignement - string taskAssignementName1 = Recording.GenerateAssetName("taskAssignement1"); - string taskAssignementName2 = Recording.GenerateAssetName("taskAssignement2"); + string taskAssignementName1 = Recording.GenerateAssetName("taskassignement1"); + string taskAssignementName2 = Recording.GenerateAssetName("taskassignement2"); StorageTaskAssignmentProperties assignmentProperties = new StorageTaskAssignmentProperties( _storageTaskId, false, @@ -215,7 +215,9 @@ public async Task ListStorageTaskAssignments() null), new ExecutionTrigger( ExecutionTriggerType.RunOnce, - new ExecutionTriggerParameters()), + new ExecutionTriggerParameters(null,null,null,null, + startOn: new DateTimeOffset(2025, 8, 1, 1, 1, 1, new TimeSpan()), + null)), null), report: new StorageTaskAssignmentReport("container1")); var taskAssignment1 = (await _storageTaskAssignmentCollection.CreateOrUpdateAsync( @@ -245,7 +247,7 @@ public async Task ListStorageTaskAssignmentsInstancesReport() public async Task ListStorageTaskAssignmentInstancesReport() { //create TaskAssignement - string taskAssignementName = Recording.GenerateAssetName("taskAssignement"); + string taskAssignementName = Recording.GenerateAssetName("taskassignement"); StorageTaskAssignmentProperties assignmentProperties = new StorageTaskAssignmentProperties( _storageTaskId, false, @@ -257,7 +259,9 @@ public async Task ListStorageTaskAssignmentInstancesReport() null), new ExecutionTrigger( ExecutionTriggerType.RunOnce, - new ExecutionTriggerParameters()), + new ExecutionTriggerParameters(null, null, null, null, + startOn: new DateTimeOffset(2025, 8, 1, 1, 1, 1, new TimeSpan()), + null)), null), report: new StorageTaskAssignmentReport("container1")); var taskAssignment = (await _storageTaskAssignmentCollection.CreateOrUpdateAsync( @@ -266,7 +270,7 @@ public async Task ListStorageTaskAssignmentInstancesReport() new StorageTaskAssignmentData(assignmentProperties))).Value; // list TaskAssignmentInstancesReport - var reports = await taskAssignment.GetStorageTaskAssignmentInstancesReportsAsync(maxpagesize: 3, filter: "startswith(name, report)").ToEnumerableAsync(); + var reports = await taskAssignment.GetStorageTaskAssignmentInstancesReportsAsync(maxpagesize: 3, null).ToEnumerableAsync(); Assert.AreEqual(0, reports.Count); } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.net8.0.cs b/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.net8.0.cs index 2a502ac0f7f6..9490b9e98ce9 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.net8.0.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.net8.0.cs @@ -1396,6 +1396,7 @@ public static partial class DataLakeClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddDataLakeServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.AzureSasCredential sasCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddDataLakeServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.Core.TokenCredential tokenCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddDataLakeServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.Storage.StorageSharedKeyCredential sharedKeyCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddDataLakeServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeClientBuilderExtensions.cs index d219ab405f74..fac5488d47db 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure.Core; using Azure; using Azure.Core.Extensions; @@ -38,6 +39,8 @@ public static IAzureClientBuilder /// /// Registers a 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 AddDataLakeServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.net8.0.cs b/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.net8.0.cs index f94242102966..a13adf6c18c0 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.net8.0.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.net8.0.cs @@ -1533,6 +1533,7 @@ public static partial class ShareClientBuilderExtensions [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Core.Extensions.IAzureClientBuilder AddFileServiceClient(this TBuilder builder, System.Uri serviceUri) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddFileServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.Storage.StorageSharedKeyCredential sharedKeyCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddFileServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddShareServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.AzureSasCredential sasCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddShareServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.Core.TokenCredential tokenCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareClientBuilderExtensions.cs index fd9db037a2fb..e076a4fb6452 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using System.ComponentModel; using Azure.Core.Extensions; using Azure.Core; @@ -84,6 +85,8 @@ public static IAzureClientBuilder AddSha /// /// Registers a 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 AddFileServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/storage/Azure.Storage.Queues/api/Azure.Storage.Queues.net8.0.cs b/sdk/storage/Azure.Storage.Queues/api/Azure.Storage.Queues.net8.0.cs index 8b3db2dcb06a..d11dfced70b2 100644 --- a/sdk/storage/Azure.Storage.Queues/api/Azure.Storage.Queues.net8.0.cs +++ b/sdk/storage/Azure.Storage.Queues/api/Azure.Storage.Queues.net8.0.cs @@ -509,6 +509,7 @@ public static partial class QueueClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddQueueServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.AzureSasCredential sasCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddQueueServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.Core.TokenCredential tokenCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddQueueServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.Storage.StorageSharedKeyCredential sharedKeyCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddQueueServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/storage/Azure.Storage.Queues/src/QueueClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.Queues/src/QueueClientBuilderExtensions.cs index f77d8e842e0a..1b2109ae051a 100644 --- a/sdk/storage/Azure.Storage.Queues/src/QueueClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.Queues/src/QueueClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure.Core; using Azure; using Azure.Core.Extensions; @@ -65,6 +66,8 @@ public static IAzureClientBuilder AddQue /// /// Registers a 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 AddQueueServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/tables/Azure.Data.Tables/api/Azure.Data.Tables.net8.0.cs b/sdk/tables/Azure.Data.Tables/api/Azure.Data.Tables.net8.0.cs index 1f28f8da71f6..7534788e8752 100644 --- a/sdk/tables/Azure.Data.Tables/api/Azure.Data.Tables.net8.0.cs +++ b/sdk/tables/Azure.Data.Tables/api/Azure.Data.Tables.net8.0.cs @@ -522,6 +522,7 @@ public static partial class TableClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddTableServiceClient(this TBuilder builder, string connectionString) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddTableServiceClient(this TBuilder builder, System.Uri serviceUri) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddTableServiceClient(this TBuilder builder, System.Uri serviceUri, Azure.Data.Tables.TableSharedKeyCredential sharedKeyCredential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddTableServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/tables/Azure.Data.Tables/src/Extensions/TableClientBuilderExtensions.cs b/sdk/tables/Azure.Data.Tables/src/Extensions/TableClientBuilderExtensions.cs index f94452d2cfad..bd2ff65617fe 100644 --- a/sdk/tables/Azure.Data.Tables/src/Extensions/TableClientBuilderExtensions.cs +++ b/sdk/tables/Azure.Data.Tables/src/Extensions/TableClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; using Azure.Data.Tables; @@ -44,6 +45,8 @@ public static IAzureClientBuilder AddTab /// /// Registers a 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 AddTableServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/Azure.ResourceManager.Terraform.sln b/sdk/terraform/Azure.ResourceManager.Terraform/Azure.ResourceManager.Terraform.sln index 0fdcc0b1d313..bc4de22af5e7 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/Azure.ResourceManager.Terraform.sln +++ b/sdk/terraform/Azure.ResourceManager.Terraform/Azure.ResourceManager.Terraform.sln @@ -7,8 +7,6 @@ Project("{57104F4E-33D2-4712-89D0-35A4165C1BA1}") = "Azure.ResourceManager.Terra EndProject Project("{57104F4E-33D2-4712-89D0-35A4165C1BA1}") = "Azure.ResourceManager.Terraform.Tests", "tests\Azure.ResourceManager.Terraform.Tests.csproj", "{DC07DC97-58C7-4345-B915-29DF7739ABD5}" EndProject -Project("{57104F4E-33D2-4712-89D0-35A4165C1BA1}") = "Azure.ResourceManager.Terraform.Samples", "samples\Azure.ResourceManager.Terraform.Samples.csproj", "{0C87CC4B-8863-41FC-8704-20CC6F8A58E1}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/samples/Azure.ResourceManager.Terraform.Samples.csproj b/sdk/terraform/Azure.ResourceManager.Terraform/samples/Azure.ResourceManager.Terraform.Samples.csproj deleted file mode 100644 index 8d2d95777931..000000000000 --- a/sdk/terraform/Azure.ResourceManager.Terraform/samples/Azure.ResourceManager.Terraform.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/terraform/Azure.ResourceManager.Terraform/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/terraform/Azure.ResourceManager.Terraform/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/terraform/Azure.ResourceManager.Terraform/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.net8.0.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.net8.0.cs index 1c472e0fe014..ced75fde56ed 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.net8.0.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.net8.0.cs @@ -1547,6 +1547,7 @@ public static partial class TextAnalyticsClientBuilderExtensions { public static Azure.Core.Extensions.IAzureClientBuilder AddTextAnalyticsClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddTextAnalyticsClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddTextAnalyticsClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClientBuilderExtensions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClientBuilderExtensions.cs index 67a793f1444e..2ef617e90c1a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClientBuilderExtensions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.AI.TextAnalytics; using Azure.Core.Extensions; @@ -34,6 +35,8 @@ public static IAzureClientBuilder /// Registers a 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 AddTextAnalyticsClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/translation/Azure.AI.Translation.Text/api/Azure.AI.Translation.Text.net8.0.cs b/sdk/translation/Azure.AI.Translation.Text/api/Azure.AI.Translation.Text.net8.0.cs index e55ea66e733a..1da6d68a553f 100644 --- a/sdk/translation/Azure.AI.Translation.Text/api/Azure.AI.Translation.Text.net8.0.cs +++ b/sdk/translation/Azure.AI.Translation.Text/api/Azure.AI.Translation.Text.net8.0.cs @@ -445,6 +445,7 @@ public static partial class TextTranslationClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddTextTranslationClient(this TBuilder builder, Azure.AzureKeyCredential credential, System.Uri endpoint, string region) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddTextTranslationClient(this TBuilder builder, Azure.Core.TokenCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddTextTranslationClient(this TBuilder builder, Azure.Core.TokenCredential credential, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddTextTranslationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/translation/Azure.AI.Translation.Text/src/Custom/TextTranslationClientBuilderExtensions.cs b/sdk/translation/Azure.AI.Translation.Text/src/Custom/TextTranslationClientBuilderExtensions.cs index 78d25726c9d8..dbefbec7c18d 100644 --- a/sdk/translation/Azure.AI.Translation.Text/src/Custom/TextTranslationClientBuilderExtensions.cs +++ b/sdk/translation/Azure.AI.Translation.Text/src/Custom/TextTranslationClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using System.Collections.Generic; using System.Net; using System.Text; @@ -80,6 +81,8 @@ public static IAzureClientBuilder Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddTextTranslationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub/api/Azure.Messaging.WebPubSub.net8.0.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub/api/Azure.Messaging.WebPubSub.net8.0.cs index bc4e3e895e9a..eaa8e28306a8 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub/api/Azure.Messaging.WebPubSub.net8.0.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub/api/Azure.Messaging.WebPubSub.net8.0.cs @@ -140,6 +140,7 @@ public static partial class WebPubSubServiceClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddWebPubSubServiceClient(this TBuilder builder, string connectionString, string hub) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddWebPubSubServiceClient(this TBuilder builder, System.Uri endpoint, string hub, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddWebPubSubServiceClient(this TBuilder builder, System.Uri endpoint, string hub, Azure.Core.TokenCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("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 Azure.Core.Extensions.IAzureClientBuilder AddWebPubSubServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/WebPubSubServiceClientBuilderExtensions.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/WebPubSubServiceClientBuilderExtensions.cs index 04149fe284a9..9b8eec394d9e 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/WebPubSubServiceClientBuilderExtensions.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/WebPubSubServiceClientBuilderExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Diagnostics.CodeAnalysis; using Azure; using Azure.Core; @@ -49,6 +50,8 @@ public static IAzureClientBuilder Registers a instance. /// The builder to register with. /// The configuration values. + [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 AddWebPubSubServiceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration { diff --git a/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md b/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md index adb6b6cd72a3..8477f5d4adeb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md +++ b/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md @@ -8,6 +8,8 @@ ### Bugs Fixed +- Fix deserialization method for `AppServiceApiDefinitionInfo` class to allow empty url string. + ### Other Changes ## 1.4.0 (2025-05-23) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceApiDefinitionInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceApiDefinitionInfo.Serialization.cs index 9e7b2d9bab2d..cf72e11daaa6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceApiDefinitionInfo.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceApiDefinitionInfo.Serialization.cs @@ -84,7 +84,7 @@ internal static AppServiceApiDefinitionInfo DeserializeAppServiceApiDefinitionIn { if (property.NameEquals("url"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) { continue; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md index ce9931c88695..80abb2a8160f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md +++ b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md @@ -744,6 +744,7 @@ prepend-rp-prefix: models-to-treat-empty-string-as-null: - WebAppBackupData - WebSiteInstanceStatusData + - AppServiceApiDefinitionInfo directive: # operation removal - should be temporary diff --git a/sdk/websites/Azure.ResourceManager.AppService/tests/TestsCase/ApiDefinitionInfoTests.cs b/sdk/websites/Azure.ResourceManager.AppService/tests/TestsCase/ApiDefinitionInfoTests.cs new file mode 100644 index 000000000000..21ead053ab40 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/tests/TestsCase/ApiDefinitionInfoTests.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel.Primitives; +using System.IO; +using System.Text; +using System.Text.Json; +using Azure.ResourceManager.AppService.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppService.Tests.TestsCase +{ + public class ApiDefinitionInfoTests + { + [TestCase("{\"url\":null}")] + [TestCase("{\"url\":\"\"}")] + public void DeserializeAppServiceApiDefinitionInfo_UrlNullOrEmpty_ResultsInNullUri(string json) + { + var options = new ModelReaderWriterOptions("J"); + using var doc = JsonDocument.Parse(json); + var result = AppServiceApiDefinitionInfo.DeserializeAppServiceApiDefinitionInfo(doc.RootElement, options); + Assert.IsNull(result.Uri); + } + + [Test] + public void Serialize_OmitsUrl_WhenUriIsNull() + { + var info = new AppServiceApiDefinitionInfo(); + using var memoryStream = new MemoryStream(); + var writer = new Utf8JsonWriter(memoryStream); + var options = new ModelReaderWriterOptions("J"); + + ((IJsonModel)info).Write(writer, options); + writer.Flush(); + + string output = Encoding.UTF8.GetString(memoryStream.ToArray()); + StringAssert.DoesNotContain("\"url\"", output); + } + } +} diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/Azure.ResourceManager.WeightsAndBiases.sln b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/Azure.ResourceManager.WeightsAndBiases.sln index e20db7e802fa..b00b9acc0108 100644 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/Azure.ResourceManager.WeightsAndBiases.sln +++ b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/Azure.ResourceManager.WeightsAndBiases.sln @@ -7,8 +7,6 @@ Project("{7084F53A-7A93-47E3-A8AF-CA120F237830}") = "Azure.ResourceManager.Weigh EndProject Project("{7084F53A-7A93-47E3-A8AF-CA120F237830}") = "Azure.ResourceManager.WeightsAndBiases.Tests", "tests\Azure.ResourceManager.WeightsAndBiases.Tests.csproj", "{17FC3AF6-E574-45CB-8CFF-A3DFC8D9F774}" EndProject -Project("{7084F53A-7A93-47E3-A8AF-CA120F237830}") = "Azure.ResourceManager.WeightsAndBiases.Samples", "samples\Azure.ResourceManager.WeightsAndBiases.Samples.csproj", "{37FCF7F7-BA85-4D9F-9E2B-7EEEDBB8C067}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Azure.ResourceManager.WeightsAndBiases.Samples.csproj b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Azure.ResourceManager.WeightsAndBiases.Samples.csproj deleted file mode 100644 index e412d2a857b9..000000000000 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Azure.ResourceManager.WeightsAndBiases.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceCollection.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Generated/Samples/Sample_WeightsAndBiasesInstanceCollection.cs similarity index 100% rename from sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceCollection.cs rename to sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Generated/Samples/Sample_WeightsAndBiasesInstanceCollection.cs diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceResource.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Generated/Samples/Sample_WeightsAndBiasesInstanceResource.cs similarity index 100% rename from sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/samples/Generated/Samples/Sample_WeightsAndBiasesInstanceResource.cs rename to sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/tests/Generated/Samples/Sample_WeightsAndBiasesInstanceResource.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Azure.ResourceManager.WorkloadsSapVirtualInstance.sln b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Azure.ResourceManager.WorkloadsSapVirtualInstance.sln index 9593676c870f..3779c2dfee3f 100644 --- a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Azure.ResourceManager.WorkloadsSapVirtualInstance.sln +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Azure.ResourceManager.WorkloadsSapVirtualInstance.sln @@ -7,8 +7,6 @@ Project("{58ED53BB-B601-4D64-B4AE-3D8828AC2EF1}") = "Azure.ResourceManager.Workl EndProject Project("{58ED53BB-B601-4D64-B4AE-3D8828AC2EF1}") = "Azure.ResourceManager.WorkloadsSapVirtualInstance.Tests", "tests\Azure.ResourceManager.WorkloadsSapVirtualInstance.Tests.csproj", "{5ECFFF83-AFCA-4B70-A373-0EADBA557DC2}" EndProject -Project("{58ED53BB-B601-4D64-B4AE-3D8828AC2EF1}") = "Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples", "samples\Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples.csproj", "{FB45B373-C2B7-4EE8-80DB-DF95A2899696}" -EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples.csproj deleted file mode 100644 index 2013f1281da6..000000000000 --- a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapCentralServerInstanceResource.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapCentralServerInstanceResource.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapDatabaseInstanceResource.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapDatabaseInstanceResource.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapVirtualInstanceCollection.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapVirtualInstanceCollection.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapVirtualInstanceResource.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SapVirtualInstanceResource.cs diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs