From 2515165b866d57373630230439308aa533cef22f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 19 Dec 2024 12:43:58 +0000 Subject: [PATCH] CodeGen from PR 31855 in Azure/azure-rest-api-specs Merge 15d88811156b297076d72f4aac7503542dae4dff into c335551e028d88eccf20a474944392438136bebc --- ...e.Developer.MicrosoftPlaywrightTesting.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 107 + ...eveloper.MicrosoftPlaywrightTesting.csproj | 19 + .../Generated/AccessToken.Serialization.cs | 201 + .../src/Generated/AccessToken.cs | 97 + .../src/Generated/AccessTokenState.cs | 51 + .../src/Generated/AccessTokens.cs | 562 ++ .../src/Generated/Account.Serialization.cs | 295 + .../src/Generated/Account.cs | 109 + .../src/Generated/AccountState.cs | 51 + .../src/Generated/Accounts.cs | 340 + .../src/Generated/AuthManagerClient.cs | 85 + .../src/Generated/AuthManagerClientOptions.cs | 37 + ...laywrightTestingClientBuilderExtensions.cs | 38 + ...rMicrosoftPlaywrightTestingModelFactory.cs | 69 + .../src/Generated/Docs/AccessTokens.xml | 225 + .../src/Generated/Docs/Accounts.xml | 117 + .../src/Generated/EnablementStatus.cs | 51 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 398 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../src/Generated/OS.cs | 51 + .../src/Generated/SubscriptionState.cs | 60 + .../src/Properties/AssemblyInfo.cs | 11 + ...er.MicrosoftPlaywrightTesting.Tests.csproj | 20 + .../Generated/Samples/Samples_AccessTokens.cs | 239 + .../Generated/Samples/Samples_Accounts.cs | 131 + .../tsp-location.yaml | 4 + .../Configuration.json | 12 + .../tsp-location.yaml | 5 +- .../tspCodeModel.json | 7107 +++++++++++++++++ 36 files changed, 11118 insertions(+), 2 deletions(-) create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Azure.Developer.MicrosoftPlaywrightTesting.sln create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/CHANGELOG.md create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Directory.Build.props create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.md create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Azure.Developer.MicrosoftPlaywrightTesting.csproj create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokenState.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokens.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccountState.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Accounts.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClient.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClientOptions.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingModelFactory.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/AccessTokens.xml create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/Accounts.xml create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/EnablementStatus.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Argument.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Optional.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/OS.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/SubscriptionState.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Properties/AssemblyInfo.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_AccessTokens.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_Accounts.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tsp-location.yaml create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Configuration.json create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tspCodeModel.json diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Azure.Developer.MicrosoftPlaywrightTesting.sln b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Azure.Developer.MicrosoftPlaywrightTesting.sln new file mode 100644 index 0000000000000..f0b95cc94a15c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Azure.Developer.MicrosoftPlaywrightTesting.sln @@ -0,0 +1,56 @@ +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.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.MicrosoftPlaywrightTesting", "src\Azure.Developer.MicrosoftPlaywrightTesting.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.MicrosoftPlaywrightTesting.Tests", "tests\Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.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 + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/CHANGELOG.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/CHANGELOG.md new file mode 100644 index 0000000000000..13dd08af78abe --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Directory.Build.props b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Directory.Build.props new file mode 100644 index 0000000000000..63bd836ad44b7 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.md new file mode 100644 index 0000000000000..dcf87d94cdf2b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.md @@ -0,0 +1,107 @@ +# Azure.Developer.MicrosoftPlaywrightTesting client library for .NET + +Azure.Developer.MicrosoftPlaywrightTesting is a managed service that helps developers get secret simply and securely. + +Use the client library for to: + +* [Get secret](https://docs.microsoft.com/azure) + +[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples] + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository. + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.Developer.MicrosoftPlaywrightTesting --prerelease +``` + +### Prerequisites + +Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB: + +> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. + +### Authenticate the client + +If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating. + +For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object. + +### Service API versions + +The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version. + +For example, + +```C# Snippet:CreateClientForSpecificApiVersion +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.) +var client = new Client(endpoint, credential, options); +``` + +When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + +## Key concepts + +The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity. + +Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of: + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/samples). + +## Troubleshooting + +Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery. + +Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API. + +If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code. + +## Next steps + +* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory. +* If appropriate, point users to other packages that might be useful. +* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for. + +## Contributing + +This is a template, but your SDK readme should include details on how to contribute code to the repo/package. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.png) diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Azure.Developer.MicrosoftPlaywrightTesting.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Azure.Developer.MicrosoftPlaywrightTesting.csproj new file mode 100644 index 0000000000000..4a68b892e00d5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Azure.Developer.MicrosoftPlaywrightTesting.csproj @@ -0,0 +1,19 @@ + + + This is the Azure.Developer.MicrosoftPlaywrightTesting client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.Developer.MicrosoftPlaywrightTesting for Azure Data Plane + 1.0.0-beta.1 + Azure.Developer.MicrosoftPlaywrightTesting + $(RequiredTargetFrameworks) + true + + + + + + + + + + + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.Serialization.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.Serialization.cs new file mode 100644 index 0000000000000..2916dd2e3f669 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.Serialization.cs @@ -0,0 +1,201 @@ +// 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.Developer.MicrosoftPlaywrightTesting +{ + public partial class AccessToken : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(AccessToken)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && Optional.IsDefined(JwtToken)) + { + writer.WritePropertyName("jwtToken"u8); + writer.WriteStringValue(JwtToken); + } + if (options.Format != "W") + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt, "O"); + } + writer.WritePropertyName("expiryAt"u8); + writer.WriteStringValue(ExpiryAt, "O"); + if (options.Format != "W") + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AccessToken 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(AccessToken)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccessToken(document.RootElement, options); + } + + internal static AccessToken DeserializeAccessToken(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid id = default; + string name = default; + string jwtToken = default; + DateTimeOffset createdAt = default; + DateTimeOffset expiryAt = default; + AccessTokenState state = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("jwtToken"u8)) + { + jwtToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expiryAt"u8)) + { + expiryAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + state = new AccessTokenState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AccessToken( + id, + name, + jwtToken, + createdAt, + expiryAt, + state, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AccessToken)} does not support writing '{options.Format}' format."); + } + } + + AccessToken IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAccessToken(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccessToken)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AccessToken FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAccessToken(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.cs new file mode 100644 index 0000000000000..f681c953a6892 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + /// Model of an access-token linked to an account. + public partial class AccessToken + { + /// + /// 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 access-token name. + /// The access-token expiryAt utcDateTime. + /// is null. + public AccessToken(string name, DateTimeOffset expiryAt) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + ExpiryAt = expiryAt; + } + + /// Initializes a new instance of . + /// The access-token id. + /// The access-token name. + /// The access-token value in JWT format. + /// The access-token createdAt utcDateTime. + /// The access-token expiryAt utcDateTime. + /// The access-token state - Active | Expired. + /// Keeps track of any properties unknown to the library. + internal AccessToken(Guid id, string name, string jwtToken, DateTimeOffset createdAt, DateTimeOffset expiryAt, AccessTokenState state, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + JwtToken = jwtToken; + CreatedAt = createdAt; + ExpiryAt = expiryAt; + State = state; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AccessToken() + { + } + + /// The access-token id. + public Guid Id { get; } + /// The access-token name. + public string Name { get; set; } + /// The access-token value in JWT format. + public string JwtToken { get; } + /// The access-token createdAt utcDateTime. + public DateTimeOffset CreatedAt { get; } + /// The access-token expiryAt utcDateTime. + public DateTimeOffset ExpiryAt { get; set; } + /// The access-token state - Active | Expired. + public AccessTokenState State { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokenState.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokenState.cs new file mode 100644 index 0000000000000..f321e87331801 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokenState.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.Developer.MicrosoftPlaywrightTesting +{ + /// The access-token state. + public readonly partial struct AccessTokenState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AccessTokenState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string ExpiredValue = "Expired"; + + /// The access-token is Active. + public static AccessTokenState Active { get; } = new AccessTokenState(ActiveValue); + /// The access-token is Expired. + public static AccessTokenState Expired { get; } = new AccessTokenState(ExpiredValue); + /// Determines if two values are the same. + public static bool operator ==(AccessTokenState left, AccessTokenState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AccessTokenState left, AccessTokenState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AccessTokenState(string value) => new AccessTokenState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AccessTokenState other && Equals(other); + /// + public bool Equals(AccessTokenState 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokens.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokens.cs new file mode 100644 index 0000000000000..141567fa8cc8d --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokens.cs @@ -0,0 +1,562 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + // Data plane generated sub-client. + /// The AccessTokens sub-client. + public partial class AccessTokens + { + private static readonly string[] AuthorizationScopes = new string[] { "https://playwright.microsoft.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of AccessTokens for mocking. + protected AccessTokens() + { + } + + /// Initializes a new instance of AccessTokens. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + /// The API version to use for this operation. + internal AccessTokens(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Creates an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The access-token id. + /// The resource instance. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CreateOrReplaceAsync(string accountId, Guid accessTokenId, AccessToken resource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + Argument.AssertNotNull(resource, nameof(resource)); + + using RequestContent content = resource.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateOrReplaceAsync(accountId, accessTokenId, content, context).ConfigureAwait(false); + return Response.FromValue(AccessToken.FromResponse(response), response); + } + + /// Creates an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The access-token id. + /// The resource instance. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CreateOrReplace(string accountId, Guid accessTokenId, AccessToken resource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + Argument.AssertNotNull(resource, nameof(resource)); + + using RequestContent content = resource.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateOrReplace(accountId, accessTokenId, content, context); + return Response.FromValue(AccessToken.FromResponse(response), response); + } + + /// + /// [Protocol Method] Creates an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateOrReplaceAsync(string accountId, Guid accessTokenId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.CreateOrReplace"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrReplaceRequest(accountId, accessTokenId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateOrReplace(string accountId, Guid accessTokenId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.CreateOrReplace"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrReplaceRequest(accountId, accessTokenId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The access-token id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetAccessTokenAsync(string accountId, Guid accessTokenId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAccessTokenAsync(accountId, accessTokenId, context).ConfigureAwait(false); + return Response.FromValue(AccessToken.FromResponse(response), response); + } + + /// Gets an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The access-token id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetAccessToken(string accountId, Guid accessTokenId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAccessToken(accountId, accessTokenId, context); + return Response.FromValue(AccessToken.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetAccessTokenAsync(string accountId, Guid accessTokenId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.GetAccessToken"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAccessTokenRequest(accountId, accessTokenId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetAccessToken(string accountId, Guid accessTokenId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.GetAccessToken"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAccessTokenRequest(accountId, accessTokenId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteAsync(string accountId, Guid accessTokenId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(accountId, accessTokenId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Delete(string accountId, Guid accessTokenId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(accountId, accessTokenId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists access-tokens for the given account id. It can use OData query params like $select, $filter, $orderby, $top and $skip. The default page size is 10. Use nextLink in response to fetch more objects in the list. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetAccessTokensAsync(string accountId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccessTokensRequest(accountId, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccessTokensNextPageRequest(nextLink, accountId, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AccessToken.DeserializeAccessToken(e), ClientDiagnostics, _pipeline, "AccessTokens.GetAccessTokens", "value", "nextLink", context); + } + + /// Lists access-tokens for the given account id. It can use OData query params like $select, $filter, $orderby, $top and $skip. The default page size is 10. Use nextLink in response to fetch more objects in the list. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetAccessTokens(string accountId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccessTokensRequest(accountId, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccessTokensNextPageRequest(nextLink, accountId, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AccessToken.DeserializeAccessToken(e), ClientDiagnostics, _pipeline, "AccessTokens.GetAccessTokens", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists access-tokens for the given account id. It can use OData query params like $select, $filter, $orderby, $top and $skip. The default page size is 10. Use nextLink in response to fetch more objects in the list. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetAccessTokensAsync(string accountId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccessTokensRequest(accountId, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccessTokensNextPageRequest(nextLink, accountId, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AccessTokens.GetAccessTokens", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists access-tokens for the given account id. It can use OData query params like $select, $filter, $orderby, $top and $skip. The default page size is 10. Use nextLink in response to fetch more objects in the list. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetAccessTokens(string accountId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccessTokensRequest(accountId, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccessTokensNextPageRequest(nextLink, accountId, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AccessTokens.GetAccessTokens", "value", "nextLink", context); + } + + internal HttpMessage CreateCreateOrReplaceRequest(string accountId, Guid accessTokenId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens/", false); + uri.AppendPath(accessTokenId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetAccessTokenRequest(string accountId, Guid accessTokenId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens/", false); + uri.AppendPath(accessTokenId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteRequest(string accountId, Guid accessTokenId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens/", false); + uri.AppendPath(accessTokenId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAccessTokensRequest(string accountId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAccessTokensNextPageRequest(string nextLink, string accountId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.Serialization.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.Serialization.cs new file mode 100644 index 0000000000000..cc2c94d0ee3d9 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.Serialization.cs @@ -0,0 +1,295 @@ +// 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.Developer.MicrosoftPlaywrightTesting +{ + public partial class Account : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(Account)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (options.Format != "W") + { + writer.WritePropertyName("subscriptionState"u8); + writer.WriteStringValue(SubscriptionState.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId); + } + if (options.Format != "W") + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (options.Format != "W" && Optional.IsDefined(RegionalAffinity)) + { + writer.WritePropertyName("regionalAffinity"u8); + writer.WriteStringValue(RegionalAffinity.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ScalableExecution)) + { + writer.WritePropertyName("scalableExecution"u8); + writer.WriteStringValue(ScalableExecution.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Reporting)) + { + writer.WritePropertyName("reporting"u8); + writer.WriteStringValue(Reporting.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LocalAuth)) + { + writer.WritePropertyName("localAuth"u8); + writer.WriteStringValue(LocalAuth.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Account 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(Account)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccount(document.RootElement, options); + } + + internal static Account DeserializeAccount(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string resourceId = default; + string name = default; + AccountState state = default; + Guid subscriptionId = default; + SubscriptionState subscriptionState = default; + Guid tenantId = default; + string location = default; + EnablementStatus? regionalAffinity = default; + EnablementStatus? scalableExecution = default; + EnablementStatus? reporting = default; + EnablementStatus? localAuth = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = new AccountState(property.Value.GetString()); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("subscriptionState"u8)) + { + subscriptionState = new SubscriptionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("regionalAffinity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regionalAffinity = new EnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("scalableExecution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scalableExecution = new EnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("reporting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reporting = new EnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("localAuth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAuth = new EnablementStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Account( + id, + resourceId, + name, + state, + subscriptionId, + subscriptionState, + tenantId, + location, + regionalAffinity, + scalableExecution, + reporting, + localAuth, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Account)} does not support writing '{options.Format}' format."); + } + } + + Account IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAccount(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Account)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static Account FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAccount(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.cs new file mode 100644 index 0000000000000..be4afd6848bbb --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + /// An account is a parent resource for most of the other service resources. It's directly mapped to an Azure resource. + public partial class Account + { + /// + /// 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 Account() + { + } + + /// Initializes a new instance of . + /// The account id. + /// The fully-qualified Azure resource id for the account. + /// The account name. + /// The state of account - Active | Inactive. + /// The Azure subscription id for the account. + /// The Azure subscription state - Registered | Unregistered | Warned | Suspended | Deleted. + /// The Azure tenant id of the account. + /// The account resource location in Azure, for eg. eastus, southeastasia. + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + /// Keeps track of any properties unknown to the library. + internal Account(string id, string resourceId, string name, AccountState state, Guid subscriptionId, SubscriptionState subscriptionState, Guid tenantId, string location, EnablementStatus? regionalAffinity, EnablementStatus? scalableExecution, EnablementStatus? reporting, EnablementStatus? localAuth, IDictionary serializedAdditionalRawData) + { + Id = id; + ResourceId = resourceId; + Name = name; + State = state; + SubscriptionId = subscriptionId; + SubscriptionState = subscriptionState; + TenantId = tenantId; + Location = location; + RegionalAffinity = regionalAffinity; + ScalableExecution = scalableExecution; + Reporting = reporting; + LocalAuth = localAuth; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The account id. + public string Id { get; } + /// The fully-qualified Azure resource id for the account. + public string ResourceId { get; } + /// The account name. + public string Name { get; } + /// The state of account - Active | Inactive. + public AccountState State { get; } + /// The Azure subscription id for the account. + public Guid SubscriptionId { get; } + /// The Azure subscription state - Registered | Unregistered | Warned | Suspended | Deleted. + public SubscriptionState SubscriptionState { get; } + /// The Azure tenant id of the account. + public Guid TenantId { get; } + /// The account resource location in Azure, for eg. eastus, southeastasia. + public string Location { get; } + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + public EnablementStatus? RegionalAffinity { get; } + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + public EnablementStatus? ScalableExecution { get; } + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + public EnablementStatus? Reporting { get; } + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + public EnablementStatus? LocalAuth { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccountState.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccountState.cs new file mode 100644 index 0000000000000..bac66ed7f0e2e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccountState.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.Developer.MicrosoftPlaywrightTesting +{ + /// The account state. + public readonly partial struct AccountState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AccountState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string InactiveValue = "Inactive"; + + /// The account is Active. + public static AccountState Active { get; } = new AccountState(ActiveValue); + /// The account is Inactive. + public static AccountState Inactive { get; } = new AccountState(InactiveValue); + /// Determines if two values are the same. + public static bool operator ==(AccountState left, AccountState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AccountState left, AccountState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AccountState(string value) => new AccountState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AccountState other && Equals(other); + /// + public bool Equals(AccountState 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Accounts.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Accounts.cs new file mode 100644 index 0000000000000..316240ab1de1a --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Accounts.cs @@ -0,0 +1,340 @@ +// 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.Core.Pipeline; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + // Data plane generated sub-client. + /// The Accounts sub-client. + public partial class Accounts + { + private static readonly string[] AuthorizationScopes = new string[] { "https://playwright.microsoft.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of Accounts for mocking. + protected Accounts() + { + } + + /// Initializes a new instance of Accounts. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + /// The API version to use for this operation. + internal Accounts(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get details of the Azure resource mapped to an account for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetAccountAsync(string accountId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAccountAsync(accountId, context).ConfigureAwait(false); + return Response.FromValue(Account.FromResponse(response), response); + } + + /// Get details of the Azure resource mapped to an account for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetAccount(string accountId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAccount(accountId, context); + return Response.FromValue(Account.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get details of the Azure resource mapped to an account for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetAccountAsync(string accountId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("Accounts.GetAccount"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAccountRequest(accountId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get details of the Azure resource mapped to an account for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetAccount(string accountId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("Accounts.GetAccount"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAccountRequest(accountId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets remote browsers corresponding to given account id and redirects the client for running Playwright tests. Authorization required is Bearer JWT Access token provided by EntraID or Microsoft Playwright Testing Service. + /// The account id. + /// The run id provided by client for corresponding remote test run. + /// The os provided by client for remote test runs. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task GetBrowsersAsync(string accountId, string runId = null, OS? os = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetBrowsersAsync(accountId, runId, os?.ToString(), context).ConfigureAwait(false); + return response; + } + + /// Gets remote browsers corresponding to given account id and redirects the client for running Playwright tests. Authorization required is Bearer JWT Access token provided by EntraID or Microsoft Playwright Testing Service. + /// The account id. + /// The run id provided by client for corresponding remote test run. + /// The os provided by client for remote test runs. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetBrowsers(string accountId, string runId = null, OS? os = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetBrowsers(accountId, runId, os?.ToString(), context); + return response; + } + + /// + /// [Protocol Method] Gets remote browsers corresponding to given account id and redirects the client for running Playwright tests. Authorization required is Bearer JWT Access token provided by EntraID or Microsoft Playwright Testing Service. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The run id provided by client for corresponding remote test run. + /// The os provided by client for remote test runs. Allowed values: "linux" | "windows". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetBrowsersAsync(string accountId, string runId, string os, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("Accounts.GetBrowsers"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBrowsersRequest(accountId, runId, os, context); + RedirectPolicy.SetAllowAutoRedirect(message, true); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets remote browsers corresponding to given account id and redirects the client for running Playwright tests. Authorization required is Bearer JWT Access token provided by EntraID or Microsoft Playwright Testing Service. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The run id provided by client for corresponding remote test run. + /// The os provided by client for remote test runs. Allowed values: "linux" | "windows". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetBrowsers(string accountId, string runId, string os, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("Accounts.GetBrowsers"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBrowsersRequest(accountId, runId, os, context); + RedirectPolicy.SetAllowAutoRedirect(message, true); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetAccountRequest(string accountId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetBrowsersRequest(string accountId, string runId, string os, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier302); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/browsers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (runId != null) + { + uri.AppendQuery("runId", runId, true); + } + if (os != null) + { + uri.AppendQuery("os", os, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier302; + private static ResponseClassifier ResponseClassifier302 => _responseClassifier302 ??= new StatusCodeClassifier(stackalloc ushort[] { 302 }); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClient.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClient.cs new file mode 100644 index 0000000000000..aeae0a5f32755 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClient.cs @@ -0,0 +1,85 @@ +// 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.Developer.MicrosoftPlaywrightTesting +{ + // Data plane generated client. + /// The AuthManager service client. + public partial class AuthManagerClient + { + private static readonly string[] AuthorizationScopes = new string[] { "https://playwright.microsoft.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of AuthManagerClient for mocking. + protected AuthManagerClient() + { + } + + /// Initializes a new instance of AuthManagerClient. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + /// A credential used to authenticate to an Azure Service. + /// or is null. + public AuthManagerClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AuthManagerClientOptions()) + { + } + + /// Initializes a new instance of AuthManagerClient. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public AuthManagerClient(Uri endpoint, TokenCredential credential, AuthManagerClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthManagerClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of AccessTokens. + /// The API version to use for this operation. + /// is null. + public virtual AccessTokens GetAccessTokensClient(string apiVersion = "2024-12-01") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new AccessTokens(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of Accounts. + /// The API version to use for this operation. + /// is null. + public virtual Accounts GetAccountsClient(string apiVersion = "2024-12-01") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new Accounts(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClientOptions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClientOptions.cs new file mode 100644 index 0000000000000..99fd673ddfd43 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + /// Client options for AuthManagerClient. + public partial class AuthManagerClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_12_01; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2024-12-01". + V2024_12_01 = 1, + } + + internal string Version { get; } + + /// Initializes new instance of AuthManagerClientOptions. + public AuthManagerClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2024_12_01 => "2024-12-01", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions.cs new file mode 100644 index 0000000000000..364126f7a80cc --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core.Extensions; +using Azure.Developer.MicrosoftPlaywrightTesting; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + public static IAzureClientBuilder AddAuthManagerClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new AuthManagerClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddAuthManagerClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingModelFactory.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingModelFactory.cs new file mode 100644 index 0000000000000..91a05b3a71000 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingModelFactory.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; +using System.Linq; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + /// Model factory for models. + public static partial class DeveloperMicrosoftPlaywrightTestingModelFactory + { + /// Initializes a new instance of . + /// The account id. + /// The fully-qualified Azure resource id for the account. + /// The account name. + /// The state of account - Active | Inactive. + /// The Azure subscription id for the account. + /// The Azure subscription state - Registered | Unregistered | Warned | Suspended | Deleted. + /// The Azure tenant id of the account. + /// The account resource location in Azure, for eg. eastus, southeastasia. + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + /// A new instance for mocking. + public static Account Account(string id = null, string resourceId = null, string name = null, AccountState state = default, Guid subscriptionId = default, SubscriptionState subscriptionState = default, Guid tenantId = default, string location = null, EnablementStatus? regionalAffinity = null, EnablementStatus? scalableExecution = null, EnablementStatus? reporting = null, EnablementStatus? localAuth = null) + { + return new Account( + id, + resourceId, + name, + state, + subscriptionId, + subscriptionState, + tenantId, + location, + regionalAffinity, + scalableExecution, + reporting, + localAuth, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The access-token id. + /// The access-token name. + /// The access-token value in JWT format. + /// The access-token createdAt utcDateTime. + /// The access-token expiryAt utcDateTime. + /// The access-token state - Active | Expired. + /// A new instance for mocking. + public static AccessToken AccessToken(Guid id = default, string name = null, string jwtToken = null, DateTimeOffset createdAt = default, DateTimeOffset expiryAt = default, AccessTokenState state = default) + { + return new AccessToken( + id, + name, + jwtToken, + createdAt, + expiryAt, + state, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/AccessTokens.xml b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/AccessTokens.xml new file mode 100644 index 0000000000000..aed7105943d7c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/AccessTokens.xml @@ -0,0 +1,225 @@ + + + + + +This sample shows how to call CreateOrReplaceAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +AccessToken resource = new AccessToken("sampleAccessToken", DateTimeOffset.Parse("2022-09-28T12:32:33Z")); +Response response = await client.CreateOrReplaceAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), resource); +]]> + + + +This sample shows how to call CreateOrReplace. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +AccessToken resource = new AccessToken("sampleAccessToken", DateTimeOffset.Parse("2022-09-28T12:32:33Z")); +Response response = client.CreateOrReplace("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), resource); +]]> + + + +This sample shows how to call CreateOrReplaceAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +using RequestContent content = RequestContent.Create(new +{ + id = "00000000-0000-0000-0000-000000000000", + name = "sampleAccessToken", + expiryAt = "2022-09-28T12:32:33Z", +}); +Response response = await client.CreateOrReplaceAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("createdAt").ToString()); +Console.WriteLine(result.GetProperty("expiryAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +]]> + + + +This sample shows how to call CreateOrReplace and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +using RequestContent content = RequestContent.Create(new +{ + id = "00000000-0000-0000-0000-000000000000", + name = "sampleAccessToken", + expiryAt = "2022-09-28T12:32:33Z", +}); +Response response = client.CreateOrReplace("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("createdAt").ToString()); +Console.WriteLine(result.GetProperty("expiryAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +]]> + + + +This sample shows how to call GetAccessTokenAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = await client.GetAccessTokenAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); +]]> + + + +This sample shows how to call GetAccessToken. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = client.GetAccessToken("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); +]]> + + + +This sample shows how to call GetAccessTokenAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = await client.GetAccessTokenAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("createdAt").ToString()); +Console.WriteLine(result.GetProperty("expiryAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +]]> + + + +This sample shows how to call GetAccessToken and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = client.GetAccessToken("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("createdAt").ToString()); +Console.WriteLine(result.GetProperty("expiryAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +]]> + + + +This sample shows how to call DeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = await client.DeleteAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = client.Delete("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetAccessTokensAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +await foreach (AccessToken item in client.GetAccessTokensAsync("sampleAccountId")) +{ +} +]]> + + + +This sample shows how to call GetAccessTokens. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +foreach (AccessToken item in client.GetAccessTokens("sampleAccountId")) +{ +} +]]> + + + +This sample shows how to call GetAccessTokensAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +await foreach (BinaryData item in client.GetAccessTokensAsync("sampleAccountId", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); +} +]]> + + + +This sample shows how to call GetAccessTokens and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +foreach (BinaryData item in client.GetAccessTokens("sampleAccountId", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/Accounts.xml b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/Accounts.xml new file mode 100644 index 0000000000000..a572d5f5a178b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/Accounts.xml @@ -0,0 +1,117 @@ + + + + + +This sample shows how to call GetAccountAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = await client.GetAccountAsync("sampleAccountId"); +]]> + + + +This sample shows how to call GetAccount. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = client.GetAccount("sampleAccountId"); +]]> + + + +This sample shows how to call GetAccountAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = await client.GetAccountAsync("sampleAccountId", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("subscriptionState").ToString()); +Console.WriteLine(result.GetProperty("tenantId").ToString()); +Console.WriteLine(result.GetProperty("location").ToString()); +]]> + + + +This sample shows how to call GetAccount and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = client.GetAccount("sampleAccountId", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("subscriptionState").ToString()); +Console.WriteLine(result.GetProperty("tenantId").ToString()); +Console.WriteLine(result.GetProperty("location").ToString()); +]]> + + + +This sample shows how to call GetBrowsersAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = await client.GetBrowsersAsync("sampleAccountId"); +]]> + + + +This sample shows how to call GetBrowsers. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = client.GetBrowsers("sampleAccountId"); +]]> + + + +This sample shows how to call GetBrowsersAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = await client.GetBrowsersAsync("sampleAccountId", null, "linux", null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetBrowsers. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = client.GetBrowsers("sampleAccountId", null, "linux", null); + +Console.WriteLine(response.Status); +]]> + + + \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/EnablementStatus.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/EnablementStatus.cs new file mode 100644 index 0000000000000..98e5aab7d42d3 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/EnablementStatus.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.Developer.MicrosoftPlaywrightTesting +{ + /// The enablement status of a feature. + public readonly partial struct EnablementStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnablementStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// The feature is Enabled. + public static EnablementStatus Enabled { get; } = new EnablementStatus(EnabledValue); + /// The feature is Disabled. + public static EnablementStatus Disabled { get; } = new EnablementStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(EnablementStatus left, EnablementStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnablementStatus left, EnablementStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EnablementStatus(string value) => new EnablementStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnablementStatus other && Equals(other); + /// + public bool Equals(EnablementStatus 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Argument.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Argument.cs new file mode 100644 index 0000000000000..751c33a54e9a5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 0000000000000..f1d9708929269 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 0000000000000..19167552757eb --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 0000000000000..8eea5e0eb9acc --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + internal static class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Optional.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Optional.cs new file mode 100644 index 0000000000000..aeefc5cf26a9e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 0000000000000..56ddcc549b347 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/OS.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/OS.cs new file mode 100644 index 0000000000000..5f60b83cb625b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/OS.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.Developer.MicrosoftPlaywrightTesting +{ + /// The os to configure for remote test runs. + public readonly partial struct OS : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OS(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "linux"; + private const string WindowsValue = "windows"; + + /// Linux OS. + public static OS Linux { get; } = new OS(LinuxValue); + /// Windows OS. + public static OS Windows { get; } = new OS(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(OS left, OS right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OS left, OS right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OS(string value) => new OS(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OS other && Equals(other); + /// + public bool Equals(OS 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/SubscriptionState.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/SubscriptionState.cs new file mode 100644 index 0000000000000..d3fb25818b1af --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/SubscriptionState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + /// The Azure subscription state. + public readonly partial struct SubscriptionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SubscriptionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegisteredValue = "Registered"; + private const string WarnedValue = "Warned"; + private const string SuspendedValue = "Suspended"; + private const string DeletedValue = "Deleted"; + private const string UnregisteredValue = "Unregistered"; + + /// The subscription state is Registered. + public static SubscriptionState Registered { get; } = new SubscriptionState(RegisteredValue); + /// The subscription state is Warned. + public static SubscriptionState Warned { get; } = new SubscriptionState(WarnedValue); + /// The subscription state is Suspended. + public static SubscriptionState Suspended { get; } = new SubscriptionState(SuspendedValue); + /// The subscription state is Deleted. + public static SubscriptionState Deleted { get; } = new SubscriptionState(DeletedValue); + /// The subscription state is Unregistered. + public static SubscriptionState Unregistered { get; } = new SubscriptionState(UnregisteredValue); + /// Determines if two values are the same. + public static bool operator ==(SubscriptionState left, SubscriptionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SubscriptionState left, SubscriptionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SubscriptionState(string value) => new SubscriptionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SubscriptionState other && Equals(other); + /// + public bool Equals(SubscriptionState 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Properties/AssemblyInfo.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..145709b2db913 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace 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("Microsoft.Template")] diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj new file mode 100644 index 0000000000000..f3becb133be8d --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_AccessTokens.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_AccessTokens.cs new file mode 100644 index 0000000000000..cfceb25e1a43e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_AccessTokens.cs @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.Samples +{ + public partial class Samples_AccessTokens + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_CreateOrReplace_AccessTokensCreateOrReplace() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + using RequestContent content = RequestContent.Create(new + { + id = "00000000-0000-0000-0000-000000000000", + name = "sampleAccessToken", + expiryAt = "2022-09-28T12:32:33Z", + }); + Response response = client.CreateOrReplace("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_CreateOrReplace_AccessTokensCreateOrReplace_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + using RequestContent content = RequestContent.Create(new + { + id = "00000000-0000-0000-0000-000000000000", + name = "sampleAccessToken", + expiryAt = "2022-09-28T12:32:33Z", + }); + Response response = await client.CreateOrReplaceAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_CreateOrReplace_AccessTokensCreateOrReplace_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + AccessToken resource = new AccessToken("sampleAccessToken", DateTimeOffset.Parse("2022-09-28T12:32:33Z")); + Response response = client.CreateOrReplace("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), resource); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_CreateOrReplace_AccessTokensCreateOrReplace_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + AccessToken resource = new AccessToken("sampleAccessToken", DateTimeOffset.Parse("2022-09-28T12:32:33Z")); + Response response = await client.CreateOrReplaceAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), resource); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_GetAccessToken_AccessTokensGet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = client.GetAccessToken("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_GetAccessToken_AccessTokensGet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = await client.GetAccessTokenAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_GetAccessToken_AccessTokensGet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = client.GetAccessToken("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_GetAccessToken_AccessTokensGet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = await client.GetAccessTokenAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_Delete_AccessTokensDelete() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = client.Delete("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_Delete_AccessTokensDelete_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = await client.DeleteAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_GetAccessTokens_AccessTokensList() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + foreach (BinaryData item in client.GetAccessTokens("sampleAccountId", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_GetAccessTokens_AccessTokensList_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + await foreach (BinaryData item in client.GetAccessTokensAsync("sampleAccountId", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_GetAccessTokens_AccessTokensList_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + foreach (AccessToken item in client.GetAccessTokens("sampleAccountId")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_GetAccessTokens_AccessTokensList_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + await foreach (AccessToken item in client.GetAccessTokensAsync("sampleAccountId")) + { + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_Accounts.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_Accounts.cs new file mode 100644 index 0000000000000..904af903de67c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_Accounts.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.Samples +{ + public partial class Samples_Accounts + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Account_GetAccount_AccountsGet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = client.GetAccount("sampleAccountId", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("subscriptionState").ToString()); + Console.WriteLine(result.GetProperty("tenantId").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Account_GetAccount_AccountsGet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = await client.GetAccountAsync("sampleAccountId", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("subscriptionState").ToString()); + Console.WriteLine(result.GetProperty("tenantId").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Account_GetAccount_AccountsGet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = client.GetAccount("sampleAccountId"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Account_GetAccount_AccountsGet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = await client.GetAccountAsync("sampleAccountId"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Accounts_GetBrowsers_AccountsGetBrowsers() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = client.GetBrowsers("sampleAccountId", null, "linux", null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Accounts_GetBrowsers_AccountsGetBrowsers_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = await client.GetBrowsersAsync("sampleAccountId", null, "linux", null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Accounts_GetBrowsers_AccountsGetBrowsers_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = client.GetBrowsers("sampleAccountId"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Accounts_GetBrowsers_AccountsGetBrowsers_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = await client.GetBrowsersAsync("sampleAccountId"); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tsp-location.yaml b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tsp-location.yaml new file mode 100644 index 0000000000000..470432349fbb2 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/playwrighttesting/PlaywrightTesting.AuthManager +commit: 3bf2a7c5314b4c7bb45cb1c609afcaa8b336ecf4 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Configuration.json b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Configuration.json new file mode 100644 index 0000000000000..aa258a8c76eb5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.PlaywrightTesting", + "library-name": "Azure.ResourceManager.PlaywrightTesting", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml index bfaa02c7b55e7..5814cd93064a0 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification/playwrighttesting -commit: c39acac0b3b7ceeee03b594a7b49c9bad6b8e9f2 +directory: specification/playwrighttesting/PlaywrightTesting.Management +commit: 3bf2a7c5314b4c7bb45cb1c609afcaa8b336ecf4 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tspCodeModel.json b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tspCodeModel.json new file mode 100644 index 0000000000000..001444041c896 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tspCodeModel.json @@ -0,0 +1,7107 @@ +{ + "$id": "1", + "Name": "Microsoft.AzurePlaywrightService", + "ApiVersions": [ + "2024-12-01" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "PlaywrightTestingQuotaNames", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaNames", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "ScalableExecution", + "value": "ScalableExecution", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Reporting", + "value": "Reporting", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The quota details for reporting feature. When enabled, Playwright client will be able to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.", + "decorators": [] + } + ], + "doc": "The enum for quota name.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "8", + "kind": "enum", + "name": "PlaywrightTestingProvisioningState", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.ProvisioningState", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "10", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "Creation in progress..", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "Deletion in progress..", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "Change accepted for processing..", + "decorators": [] + } + ], + "doc": "The status of the current operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "32", + "kind": "enum", + "name": "PlaywrightTestingFreeTrialState", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.FreeTrialState", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "34", + "kind": "enumvalue", + "name": "Active", + "value": "Active", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "The free-trial is Active.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Expired", + "value": "Expired", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "The free-trial is Expired.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "NotEligible", + "value": "NotEligible", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "The free-trial is Not Eligible.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "NotRegistered", + "value": "NotRegistered", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "The free-trial is Not Registered.", + "decorators": [] + } + ], + "doc": "The free-trial state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "42", + "kind": "enum", + "name": "PlaywrightTestingOfferingType", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.OfferingType", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "44", + "kind": "enumvalue", + "name": "NotApplicable", + "value": "NotApplicable", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "The offeringType is NotApplicable.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "PrivatePreview", + "value": "PrivatePreview", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "The offeringType is PrivatePreview.", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "PublicPreview", + "value": "PublicPreview", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "The offeringType is PublicPreview.", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "GeneralAvailability", + "value": "GeneralAvailability", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "The offeringType is GeneralAvailability.", + "decorators": [] + } + ], + "doc": "Offering type state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "PlaywrightTestingEnablementStatus", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.EnablementStatus", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "Enabled", + "value": "Enabled", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "The feature is Enabled.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "The feature is Disabled.", + "decorators": [] + } + ], + "doc": "The enablement status of a feature.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "58", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "60", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "66", + "kind": "enum", + "name": "PlaywrightTestingNameUnavailableReason", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "68", + "kind": "enumvalue", + "name": "Invalid", + "value": "Invalid", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "Name is invalid.", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "AlreadyExists", + "value": "AlreadyExists", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "Name already exists.", + "decorators": [] + } + ], + "doc": "Possible reasons for a name not being available.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "72", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "74", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "72" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "72" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "78", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "72" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "80", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "82", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "80" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "84", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Versions", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "86", + "kind": "enumvalue", + "name": "2024-12-01", + "value": "2024-12-01", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "84" + }, + "doc": "2024-12-01 version", + "decorators": [] + } + ], + "doc": "Microsoft.AzurePlaywrightService Management API Versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "88", + "kind": "model", + "name": "PlaywrightTestingAccountQuotas", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuota", + "usage": "Output,Json", + "doc": "A quota resource for a Playwright service account.", + "decorators": [], + "baseModel": { + "$id": "89", + "kind": "model", + "name": "ProxyResource", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Output,Json", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "90", + "kind": "model", + "name": "Resource", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "91", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "92", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id" + }, + { + "$id": "94", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name" + }, + { + "$id": "96", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "97", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "98", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type" + }, + { + "$id": "99", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "100", + "kind": "model", + "name": "SystemData", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "101", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy" + }, + { + "$id": "103", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType" + }, + { + "$id": "104", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "105", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt" + }, + { + "$id": "107", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy" + }, + { + "$id": "109", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType" + }, + { + "$id": "110", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "111", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt" + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData" + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "113", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "114", + "kind": "model", + "name": "PlaywrightTestingAccountQuotaProperties", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotaProperties", + "usage": "Output,Json", + "doc": "The Playwright service account quota resource properties.", + "decorators": [], + "properties": [ + { + "$id": "115", + "kind": "property", + "name": "freeTrial", + "serializedName": "freeTrial", + "doc": "The Playwright service account quota resource free-trial properties.", + "type": { + "$id": "116", + "kind": "model", + "name": "PlaywrightTestingAccountFreeTrialProperties", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties", + "usage": "Output,Json", + "doc": "The Playwright service account quota resource free-trial properties.", + "decorators": [], + "properties": [ + { + "$id": "117", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The free-trial createdAt utcDateTime.", + "type": { + "$id": "118", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.createdAt" + }, + { + "$id": "120", + "kind": "property", + "name": "expiryAt", + "serializedName": "expiryAt", + "doc": "The free-trial expiryAt utcDateTime.", + "type": { + "$id": "121", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.expiryAt" + }, + { + "$id": "123", + "kind": "property", + "name": "allocatedValue", + "serializedName": "allocatedValue", + "doc": "The free-trial allocated limit value eg. allocated free minutes.", + "type": { + "$id": "124", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.allocatedValue" + }, + { + "$id": "125", + "kind": "property", + "name": "usedValue", + "serializedName": "usedValue", + "doc": "The free-trial used value eg. used free minutes.", + "type": { + "$id": "126", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.usedValue" + }, + { + "$id": "127", + "kind": "property", + "name": "percentageUsed", + "serializedName": "percentageUsed", + "doc": "The free-trial percentage used.", + "type": { + "$id": "128", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties.percentageUsed" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotaProperties.freeTrial" + }, + { + "$id": "129", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "8" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotaProperties.provisioningState" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuota.properties" + } + ] + }, + { + "$ref": "114" + }, + { + "$ref": "116" + }, + { + "$ref": "89" + }, + { + "$ref": "90" + }, + { + "$ref": "100" + }, + { + "$id": "130", + "kind": "model", + "name": "ErrorResponse", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Error,Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "131", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "132", + "kind": "model", + "name": "ErrorDetail", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "133", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code" + }, + { + "$id": "135", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message" + }, + { + "$id": "137", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target" + }, + { + "$id": "139", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "140", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "132" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details" + }, + { + "$id": "141", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "142", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "143", + "kind": "model", + "name": "ErrorAdditionalInfo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "144", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type" + }, + { + "$id": "146", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "147", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error" + } + ] + }, + { + "$ref": "132" + }, + { + "$ref": "143" + }, + { + "$ref": "147" + }, + { + "$id": "148", + "kind": "model", + "name": "AccountQuotaListResult", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a AccountQuota list operation.", + "decorators": [], + "properties": [ + { + "$id": "149", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The AccountQuota items on this page", + "type": { + "$id": "150", + "kind": "array", + "name": "ArrayAccountQuota", + "valueType": { + "$ref": "88" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value" + }, + { + "$id": "151", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "152", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "153", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink" + } + ] + }, + { + "$id": "154", + "kind": "model", + "name": "PlaywrightTestingQuotas", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quota", + "usage": "Output,Json", + "doc": "A subscription quota resource.", + "decorators": [], + "baseModel": { + "$ref": "89" + }, + "properties": [ + { + "$id": "155", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "156", + "kind": "model", + "name": "PlaywrightTestingQuotaProperties", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaProperties", + "usage": "Output,Json", + "doc": "The subscription quota resource properties.", + "decorators": [], + "properties": [ + { + "$id": "157", + "kind": "property", + "name": "freeTrial", + "serializedName": "freeTrial", + "doc": "The subscription quota resource free-trial properties.", + "type": { + "$id": "158", + "kind": "model", + "name": "PlaywrightTestingFreeTrialProperties", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.FreeTrialProperties", + "usage": "Output,Json", + "doc": "The subscription quota resource free-trial properties.", + "decorators": [], + "properties": [ + { + "$id": "159", + "kind": "property", + "name": "accountId", + "serializedName": "accountId", + "doc": "The Playwright service account id.", + "type": { + "$id": "160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.FreeTrialProperties.accountId" + }, + { + "$id": "161", + "kind": "property", + "name": "state", + "serializedName": "state", + "doc": "The free-trial state.", + "type": { + "$ref": "32" + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.FreeTrialProperties.state" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaProperties.freeTrial" + }, + { + "$id": "162", + "kind": "property", + "name": "offeringType", + "serializedName": "offeringType", + "doc": "Indicates the offering type for the subscription.", + "type": { + "$ref": "42" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaProperties.offeringType" + }, + { + "$id": "163", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "8" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.QuotaProperties.provisioningState" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quota.properties" + } + ] + }, + { + "$ref": "156" + }, + { + "$ref": "158" + }, + { + "$id": "164", + "kind": "model", + "name": "QuotaListResult", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Quota list operation.", + "decorators": [], + "properties": [ + { + "$id": "165", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Quota items on this page", + "type": { + "$id": "166", + "kind": "array", + "name": "ArrayQuota", + "valueType": { + "$ref": "154" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value" + }, + { + "$id": "167", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "168", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "169", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink" + } + ] + }, + { + "$id": "170", + "kind": "model", + "name": "PlaywrightTestingAccount", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Account", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "A Playwright service account resource.", + "decorators": [], + "baseModel": { + "$id": "171", + "kind": "model", + "name": "TrackedResource", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "90" + }, + "properties": [ + { + "$id": "172", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "173", + "kind": "dict", + "keyType": { + "$id": "174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags" + }, + { + "$id": "176", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location" + } + ] + }, + "properties": [ + { + "$id": "178", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "179", + "kind": "model", + "name": "PlaywrightTestingAccountProperties", + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Account resource properties.", + "decorators": [], + "properties": [ + { + "$id": "180", + "kind": "property", + "name": "dashboardUri", + "serializedName": "dashboardUri", + "doc": "The Playwright testing dashboard URI for the account resource.", + "type": { + "$id": "181", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.dashboardUri" + }, + { + "$id": "182", + "kind": "property", + "name": "regionalAffinity", + "serializedName": "regionalAffinity", + "doc": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.regionalAffinity" + }, + { + "$id": "183", + "kind": "property", + "name": "scalableExecution", + "serializedName": "scalableExecution", + "doc": "When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.scalableExecution" + }, + { + "$id": "184", + "kind": "property", + "name": "reporting", + "serializedName": "reporting", + "doc": "When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.reporting" + }, + { + "$id": "185", + "kind": "property", + "name": "localAuth", + "serializedName": "localAuth", + "doc": "When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.localAuth" + }, + { + "$id": "186", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "8" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountProperties.provisioningState" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Account.properties" + } + ] + }, + { + "$ref": "179" + }, + { + "$ref": "171" + }, + { + "$id": "187", + "kind": "model", + "name": "AccountUpdate", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the Account.", + "decorators": [], + "properties": [ + { + "$id": "188", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "189", + "kind": "dict", + "keyType": { + "$id": "190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags" + }, + { + "$id": "192", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "193", + "kind": "model", + "name": "AccountUpdateProperties", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the Account.", + "decorators": [], + "properties": [ + { + "$id": "194", + "kind": "property", + "name": "regionalAffinity", + "serializedName": "regionalAffinity", + "doc": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.regionalAffinity" + }, + { + "$id": "195", + "kind": "property", + "name": "scalableExecution", + "serializedName": "scalableExecution", + "doc": "When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.scalableExecution" + }, + { + "$id": "196", + "kind": "property", + "name": "reporting", + "serializedName": "reporting", + "doc": "When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.reporting" + }, + { + "$id": "197", + "kind": "property", + "name": "localAuth", + "serializedName": "localAuth", + "doc": "When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.localAuth" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties" + } + ] + }, + { + "$ref": "193" + }, + { + "$id": "198", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "199", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "58" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status" + }, + { + "$id": "200", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name" + }, + { + "$id": "202", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "203", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "204", + "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" + }, + { + "$id": "205", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "206", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "207", + "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" + }, + { + "$id": "208", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "209", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete" + }, + { + "$id": "210", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "132" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error" + } + ] + }, + { + "$id": "211", + "kind": "model", + "name": "AccountListResult", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Account list operation.", + "decorators": [], + "properties": [ + { + "$id": "212", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Account items on this page", + "type": { + "$id": "213", + "kind": "array", + "name": "ArrayAccount", + "valueType": { + "$ref": "170" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value" + }, + { + "$id": "214", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "215", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "216", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink" + } + ] + }, + { + "$id": "217", + "kind": "model", + "name": "PlaywrightTestingNameAvailabilityRequest", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest", + "usage": "Input,Json", + "doc": "The check availability request body.", + "decorators": [], + "properties": [ + { + "$id": "218", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource for which availability needs to be checked.", + "type": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest.name" + }, + { + "$id": "220", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The resource type.", + "type": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest.type" + } + ] + }, + { + "$id": "222", + "kind": "model", + "name": "PlaywrightTestingNameAvailabilityResult", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse", + "usage": "Output,Json", + "doc": "The check availability result.", + "decorators": [], + "properties": [ + { + "$id": "223", + "kind": "property", + "name": "IsNameAvailable", + "serializedName": "nameAvailable", + "doc": "Indicates if the resource name is available.", + "type": { + "$id": "224", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse.nameAvailable" + }, + { + "$id": "225", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "doc": "The reason why the given name is not available.", + "type": { + "$ref": "66" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse.reason" + }, + { + "$id": "226", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Detailed reason why the given name is not available.", + "type": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse.message" + } + ] + }, + { + "$id": "228", + "kind": "model", + "name": "OperationListResult", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "229", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "230", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "231", + "kind": "model", + "name": "Operation", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "232", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name" + }, + { + "$id": "234", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "235", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction" + }, + { + "$id": "236", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "237", + "kind": "model", + "name": "OperationDisplay", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "238", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider" + }, + { + "$id": "240", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource" + }, + { + "$id": "242", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation" + }, + { + "$id": "244", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display" + }, + { + "$id": "246", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "72" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin" + }, + { + "$id": "247", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "80" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value" + }, + { + "$id": "248", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "249", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "250", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink" + } + ] + }, + { + "$ref": "231" + }, + { + "$ref": "237" + } + ], + "Clients": [ + { + "$id": "251", + "Name": "AzurePlaywrightServiceClient", + "Doc": "Microsoft.AzurePlaywrightService Resource Provider Management API.", + "Operations": [], + "Protocol": { + "$id": "252" + }, + "Parameters": [ + { + "$id": "253", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "254", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "255", + "Type": { + "$id": "256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + }, + { + "$id": "257", + "Name": "Operations", + "Operations": [ + { + "$id": "258", + "Name": "list", + "ResourceName": "Operations", + "Doc": "List the operations for the provider", + "Accessibility": "public", + "Parameters": [ + { + "$id": "259", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "261", + "Type": { + "$id": "262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "263", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "264", + "kind": "constant", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "266", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "228" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.AzurePlaywrightService/operations", + "BufferResponse": true, + "Paging": { + "$id": "267", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "268", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-12-01/Operations_List.json", + "parameters": [ + { + "$id": "269", + "parameter": { + "$ref": "259" + }, + "value": { + "$id": "270", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "2024-12-01" + } + } + ], + "responses": [ + { + "$id": "271", + "response": { + "$ref": "266" + }, + "statusCode": 200, + "bodyValue": { + "$id": "272", + "kind": "model", + "type": { + "$ref": "228" + }, + "value": { + "$id": "273", + "value": { + "$id": "274", + "kind": "array", + "type": { + "$ref": "230" + }, + "value": [ + { + "$id": "275", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "276", + "name": { + "$id": "277", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "Microsoft.AzurePlaywrightService/accounts/Write" + }, + "isDataAction": { + "$id": "278", + "kind": "boolean", + "type": { + "$ref": "235" + }, + "value": false + }, + "display": { + "$id": "279", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "280", + "provider": { + "$id": "281", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "Microsoft.AzurePlaywrightService" + }, + "resource": { + "$id": "282", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "accounts" + }, + "operation": { + "$id": "283", + "kind": "string", + "type": { + "$ref": "243" + }, + "value": "Creates or updates the PlaywrightAccounts" + }, + "description": { + "$id": "284", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Set PlaywrightAccounts" + } + } + } + } + }, + { + "$id": "285", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "286", + "name": { + "$id": "287", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "Microsoft.AzurePlaywrightService/accounts/Delete" + }, + "isDataAction": { + "$id": "288", + "kind": "boolean", + "type": { + "$ref": "235" + }, + "value": false + }, + "display": { + "$id": "289", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "290", + "provider": { + "$id": "291", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "Microsoft.AzurePlaywrightService" + }, + "resource": { + "$id": "292", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "accounts" + }, + "operation": { + "$id": "293", + "kind": "string", + "type": { + "$ref": "243" + }, + "value": "Deletes the PlaywrightAccounts" + }, + "description": { + "$id": "294", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Delete PlaywrightAccounts" + } + } + } + } + }, + { + "$id": "295", + "kind": "model", + "type": { + "$ref": "231" + }, + "value": { + "$id": "296", + "name": { + "$id": "297", + "kind": "string", + "type": { + "$ref": "233" + }, + "value": "Microsoft.AzurePlaywrightService/accounts/Read" + }, + "isDataAction": { + "$id": "298", + "kind": "boolean", + "type": { + "$ref": "235" + }, + "value": false + }, + "display": { + "$id": "299", + "kind": "model", + "type": { + "$ref": "237" + }, + "value": { + "$id": "300", + "provider": { + "$id": "301", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "Microsoft.AzurePlaywrightService" + }, + "resource": { + "$id": "302", + "kind": "string", + "type": { + "$ref": "241" + }, + "value": "accounts" + }, + "operation": { + "$id": "303", + "kind": "string", + "type": { + "$ref": "243" + }, + "value": "Reads the PlaywrightAccounts" + }, + "description": { + "$id": "304", + "kind": "string", + "type": { + "$ref": "245" + }, + "value": "Read PlaywrightAccounts" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "305", + "kind": "string", + "type": { + "$ref": "249" + }, + "value": "http://nextlink.contoso.com" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "306" + }, + "Parent": "AzurePlaywrightServiceClient", + "Parameters": [ + { + "$id": "307", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "308", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "309", + "Type": { + "$id": "310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + }, + { + "$id": "311", + "Name": "Accounts", + "Operations": [ + { + "$id": "312", + "Name": "get", + "ResourceName": "Account", + "Doc": "Get a Account", + "Accessibility": "public", + "Parameters": [ + { + "$id": "313", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "315", + "Type": { + "$id": "316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "317", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "318", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "319", + "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": "320", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "321", + "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": "322", + "Name": "accountName", + "NameInRequest": "accountName", + "Doc": "Name of account.", + "Type": { + "$id": "323", + "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": "324", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "325", + "kind": "constant", + "valueType": { + "$id": "326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "327", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "170" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Accounts.get", + "Decorators": [] + }, + { + "$id": "328", + "Name": "createOrUpdate", + "ResourceName": "Account", + "Doc": "Create a Account", + "Accessibility": "public", + "Parameters": [ + { + "$id": "329", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "331", + "Type": { + "$id": "332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "333", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "334", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "335", + "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": "336", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "337", + "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": "338", + "Name": "accountName", + "NameInRequest": "accountName", + "Doc": "Name of account.", + "Type": { + "$id": "339", + "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": "340", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "341", + "kind": "constant", + "valueType": { + "$id": "342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "343", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "344", + "kind": "constant", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "346", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "170" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "347", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "170" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "348", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "170" + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "349", + "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": "350", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "351", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "352", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "170" + }, + "BodyMediaType": "Json" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts.createOrUpdate", + "Decorators": [ + { + "$id": "353", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "354", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "355", + "kind": "http", + "name": "Accounts_CreateOrUpdate", + "description": "Accounts_CreateOrUpdate", + "filePath": "2024-12-01/Accounts_CreateOrUpdate.json", + "parameters": [ + { + "$id": "356", + "parameter": { + "$ref": "329" + }, + "value": { + "$id": "357", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "2024-12-01" + } + }, + { + "$id": "358", + "parameter": { + "$ref": "333" + }, + "value": { + "$id": "359", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "360", + "parameter": { + "$ref": "336" + }, + "value": { + "$id": "361", + "kind": "string", + "type": { + "$ref": "337" + }, + "value": "dummyrg" + } + }, + { + "$id": "362", + "parameter": { + "$ref": "338" + }, + "value": { + "$id": "363", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "myPlaywrightAccount" + } + }, + { + "$id": "364", + "parameter": { + "$ref": "346" + }, + "value": { + "$id": "365", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "366", + "location": { + "$id": "367", + "kind": "string", + "type": { + "$ref": "177" + }, + "value": "westus" + }, + "tags": { + "$id": "368", + "kind": "dict", + "type": { + "$ref": "173" + }, + "value": { + "$id": "369", + "Team": { + "$id": "370", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "Dev Exp" + } + } + }, + "properties": { + "$id": "371", + "kind": "model", + "type": { + "$ref": "179" + }, + "value": { + "$id": "372", + "regionalAffinity": { + "$id": "373", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "374", + "response": { + "$ref": "347" + }, + "statusCode": 200, + "bodyValue": { + "$id": "375", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "376", + "location": { + "$id": "377", + "kind": "string", + "type": { + "$ref": "177" + }, + "value": "westus" + }, + "properties": { + "$id": "378", + "kind": "model", + "type": { + "$ref": "179" + }, + "value": { + "$id": "379", + "dashboardUri": { + "$id": "380", + "kind": "string", + "type": { + "$ref": "181" + }, + "value": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com" + }, + "provisioningState": { + "$id": "381", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + }, + "regionalAffinity": { + "$id": "382", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "scalableExecution": { + "$id": "383", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "reporting": { + "$id": "384", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "localAuth": { + "$id": "385", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + } + } + }, + "id": { + "$id": "386", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount" + }, + "name": { + "$id": "387", + "kind": "string", + "type": { + "$id": "388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "myPlaywrightAccount" + }, + "type": { + "$id": "389", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/accounts" + }, + "tags": { + "$id": "390", + "kind": "dict", + "type": { + "$ref": "173" + }, + "value": { + "$id": "391", + "Team": { + "$id": "392", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "Dev Exp" + } + } + }, + "systemData": { + "$id": "393", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "394", + "createdBy": { + "$id": "395", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "userId1001" + }, + "createdByType": { + "$id": "396", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "User" + }, + "createdAt": { + "$id": "397", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "2021-09-28T12:32:33Z" + }, + "lastModifiedBy": { + "$id": "398", + "kind": "string", + "type": { + "$ref": "108" + }, + "value": "userId1001" + }, + "lastModifiedByType": { + "$id": "399", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "400", + "kind": "string", + "type": { + "$ref": "111" + }, + "value": "2021-09-28T12:32:33Z" + } + } + } + } + } + }, + { + "$id": "401", + "response": { + "$ref": "348" + }, + "statusCode": 201, + "bodyValue": { + "$id": "402", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "403", + "location": { + "$id": "404", + "kind": "string", + "type": { + "$ref": "177" + }, + "value": "westus" + }, + "properties": { + "$id": "405", + "kind": "model", + "type": { + "$ref": "179" + }, + "value": { + "$id": "406", + "dashboardUri": { + "$id": "407", + "kind": "string", + "type": { + "$ref": "181" + }, + "value": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com" + }, + "provisioningState": { + "$id": "408", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + }, + "regionalAffinity": { + "$id": "409", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "scalableExecution": { + "$id": "410", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "reporting": { + "$id": "411", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "localAuth": { + "$id": "412", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + } + } + }, + "id": { + "$id": "413", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount" + }, + "name": { + "$id": "414", + "kind": "string", + "type": { + "$ref": "388" + }, + "value": "myPlaywrightAccount" + }, + "type": { + "$id": "415", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/accounts" + }, + "tags": { + "$id": "416", + "kind": "dict", + "type": { + "$ref": "173" + }, + "value": { + "$id": "417", + "Team": { + "$id": "418", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "Dev Exp" + } + } + }, + "systemData": { + "$id": "419", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "420", + "createdBy": { + "$id": "421", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "userId1001" + }, + "createdByType": { + "$id": "422", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "User" + }, + "createdAt": { + "$id": "423", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "2021-09-28T12:32:33Z" + }, + "lastModifiedBy": { + "$id": "424", + "kind": "string", + "type": { + "$ref": "108" + }, + "value": "userId1001" + }, + "lastModifiedByType": { + "$id": "425", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "426", + "kind": "string", + "type": { + "$ref": "111" + }, + "value": "2021-09-28T12:32:33Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "427", + "Name": "update", + "ResourceName": "Account", + "Doc": "Update a Account", + "Accessibility": "public", + "Parameters": [ + { + "$id": "428", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "430", + "Type": { + "$id": "431", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "432", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "433", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "434", + "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": "435", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "436", + "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": "437", + "Name": "accountName", + "NameInRequest": "accountName", + "Doc": "Name of account.", + "Type": { + "$id": "438", + "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": "439", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "440", + "kind": "constant", + "valueType": { + "$id": "441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "442", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "443", + "kind": "constant", + "valueType": { + "$id": "444", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "445", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "187" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "446", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "170" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts.update", + "Decorators": [], + "Examples": [ + { + "$id": "447", + "kind": "http", + "name": "Accounts_Update", + "description": "Accounts_Update", + "filePath": "2024-12-01/Accounts_Update.json", + "parameters": [ + { + "$id": "448", + "parameter": { + "$ref": "428" + }, + "value": { + "$id": "449", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "2024-12-01" + } + }, + { + "$id": "450", + "parameter": { + "$ref": "432" + }, + "value": { + "$id": "451", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "452", + "parameter": { + "$ref": "435" + }, + "value": { + "$id": "453", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "dummyrg" + } + }, + { + "$id": "454", + "parameter": { + "$ref": "437" + }, + "value": { + "$id": "455", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "myPlaywrightAccount" + } + }, + { + "$id": "456", + "parameter": { + "$ref": "445" + }, + "value": { + "$id": "457", + "kind": "model", + "type": { + "$ref": "187" + }, + "value": { + "$id": "458", + "tags": { + "$id": "459", + "kind": "dict", + "type": { + "$ref": "189" + }, + "value": { + "$id": "460", + "Team": { + "$id": "461", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "Dev Exp" + }, + "Division": { + "$id": "462", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "LT" + } + } + }, + "properties": { + "$id": "463", + "kind": "model", + "type": { + "$ref": "193" + }, + "value": { + "$id": "464", + "regionalAffinity": { + "$id": "465", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "466", + "response": { + "$ref": "446" + }, + "statusCode": 200, + "bodyValue": { + "$id": "467", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "468", + "location": { + "$id": "469", + "kind": "string", + "type": { + "$ref": "177" + }, + "value": "westus" + }, + "properties": { + "$id": "470", + "kind": "model", + "type": { + "$ref": "179" + }, + "value": { + "$id": "471", + "dashboardUri": { + "$id": "472", + "kind": "string", + "type": { + "$ref": "181" + }, + "value": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com" + }, + "provisioningState": { + "$id": "473", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + }, + "regionalAffinity": { + "$id": "474", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "scalableExecution": { + "$id": "475", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "reporting": { + "$id": "476", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + }, + "localAuth": { + "$id": "477", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "Enabled" + } + } + }, + "id": { + "$id": "478", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount" + }, + "name": { + "$id": "479", + "kind": "string", + "type": { + "$ref": "388" + }, + "value": "myPlaywrightAccount" + }, + "type": { + "$id": "480", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/accounts" + }, + "tags": { + "$id": "481", + "kind": "dict", + "type": { + "$ref": "173" + }, + "value": { + "$id": "482", + "Team": { + "$id": "483", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "Dev Exp" + } + } + }, + "systemData": { + "$id": "484", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "485", + "createdBy": { + "$id": "486", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "userId1001" + }, + "createdByType": { + "$id": "487", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "User" + }, + "createdAt": { + "$id": "488", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "2021-09-28T12:32:33Z" + }, + "lastModifiedBy": { + "$id": "489", + "kind": "string", + "type": { + "$ref": "108" + }, + "value": "userId1001" + }, + "lastModifiedByType": { + "$id": "490", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "491", + "kind": "string", + "type": { + "$ref": "111" + }, + "value": "2021-09-28T12:32:33Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "492", + "Name": "delete", + "ResourceName": "Account", + "Doc": "Delete a Account", + "Accessibility": "public", + "Parameters": [ + { + "$id": "493", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "495", + "Type": { + "$id": "496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "497", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "498", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "499", + "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": "500", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "501", + "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": "502", + "Name": "accountName", + "NameInRequest": "accountName", + "Doc": "Name of account.", + "Type": { + "$id": "503", + "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": "504", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "505", + "kind": "constant", + "valueType": { + "$id": "506", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "507", + "StatusCodes": [ + 202 + ], + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "508", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "510", + "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": "511", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "512", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", + "BufferResponse": true, + "LongRunning": { + "$id": "513", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "514", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts.delete", + "Decorators": [], + "Examples": [ + { + "$id": "515", + "kind": "http", + "name": "Accounts_Delete", + "description": "Accounts_Delete", + "filePath": "2024-12-01/Accounts_Delete.json", + "parameters": [ + { + "$id": "516", + "parameter": { + "$ref": "493" + }, + "value": { + "$id": "517", + "kind": "string", + "type": { + "$ref": "494" + }, + "value": "2024-12-01" + } + }, + { + "$id": "518", + "parameter": { + "$ref": "497" + }, + "value": { + "$id": "519", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "520", + "parameter": { + "$ref": "500" + }, + "value": { + "$id": "521", + "kind": "string", + "type": { + "$ref": "501" + }, + "value": "dummyrg" + } + }, + { + "$id": "522", + "parameter": { + "$ref": "502" + }, + "value": { + "$id": "523", + "kind": "string", + "type": { + "$ref": "503" + }, + "value": "myPlaywrightAccount" + } + } + ], + "responses": [ + { + "$id": "524", + "response": { + "$ref": "507" + }, + "statusCode": 202 + }, + { + "$id": "525", + "response": { + "$ref": "512" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "526", + "Name": "listByResourceGroup", + "ResourceName": "Account", + "Doc": "List Account resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "527", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "529", + "Type": { + "$id": "530", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "531", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "532", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "533", + "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": "534", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "535", + "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": "536", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "537", + "kind": "constant", + "valueType": { + "$id": "538", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "539", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "211" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts", + "BufferResponse": true, + "Paging": { + "$id": "540", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Accounts.listByResourceGroup", + "Decorators": [] + }, + { + "$id": "541", + "Name": "listBySubscription", + "ResourceName": "Account", + "Doc": "List Account resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "542", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "544", + "Type": { + "$id": "545", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "546", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "547", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "548", + "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": "549", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "550", + "kind": "constant", + "valueType": { + "$id": "551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "552", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "211" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts", + "BufferResponse": true, + "Paging": { + "$id": "553", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Accounts.listBySubscription", + "Decorators": [] + }, + { + "$id": "554", + "Name": "CheckPlaywrightTestingNameAvailability", + "ResourceName": "Accounts", + "Doc": "Adds check global name availability operation, normally used if a resource name must be globally unique.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "555", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "557", + "Type": { + "$id": "558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "559", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "560", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "561", + "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": "562", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "563", + "kind": "constant", + "valueType": { + "$id": "564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "565", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "566", + "kind": "constant", + "valueType": { + "$id": "567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "568", + "Name": "body", + "NameInRequest": "body", + "Doc": "The CheckAvailability request", + "Type": { + "$ref": "217" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "569", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "222" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Accounts.checkNameAvailability", + "Decorators": [], + "Examples": [ + { + "$id": "570", + "kind": "http", + "name": "Accounts_CheckNameAvailability", + "description": "Accounts_CheckNameAvailability", + "filePath": "2024-12-01/Accounts_CheckNameAvailability.json", + "parameters": [ + { + "$id": "571", + "parameter": { + "$ref": "555" + }, + "value": { + "$id": "572", + "kind": "string", + "type": { + "$ref": "556" + }, + "value": "2024-12-01" + } + }, + { + "$id": "573", + "parameter": { + "$ref": "559" + }, + "value": { + "$id": "574", + "kind": "string", + "type": { + "$ref": "560" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "575", + "parameter": { + "$ref": "568" + }, + "value": { + "$id": "576", + "kind": "model", + "type": { + "$ref": "217" + }, + "value": { + "$id": "577", + "name": { + "$id": "578", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "dummyName" + }, + "type": { + "$id": "579", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "Microsoft.AzurePlaywrightService/Accounts" + } + } + } + } + ], + "responses": [ + { + "$id": "580", + "response": { + "$ref": "569" + }, + "statusCode": 200, + "bodyValue": { + "$id": "581", + "kind": "model", + "type": { + "$ref": "222" + }, + "value": { + "$id": "582", + "nameAvailable": { + "$id": "583", + "kind": "boolean", + "type": { + "$ref": "224" + }, + "value": true + }, + "message": { + "$id": "584", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "Test message." + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "585" + }, + "Parent": "AzurePlaywrightServiceClient", + "Parameters": [ + { + "$id": "586", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "587", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "588", + "Type": { + "$id": "589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + }, + { + "$id": "590", + "Name": "Quotas", + "Operations": [ + { + "$id": "591", + "Name": "get", + "ResourceName": "Quota", + "Doc": "Get subscription quota by name.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "592", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "594", + "Type": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "596", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "597", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "598", + "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": "599", + "Name": "location", + "NameInRequest": "location", + "Doc": "The location of quota in ARM Normalized format like eastus, southeastasia etc.", + "Type": { + "$id": "600", + "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": "601", + "Name": "quotaName", + "NameInRequest": "quotaName", + "Doc": "The quota name.", + "Type": { + "$ref": "2" + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "602", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "603", + "kind": "constant", + "valueType": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "605", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "154" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quotas.get", + "Decorators": [], + "Examples": [ + { + "$id": "606", + "kind": "http", + "name": "Quotas_Get", + "description": "Quotas_Get", + "filePath": "2024-12-01/Quotas_Get.json", + "parameters": [ + { + "$id": "607", + "parameter": { + "$ref": "592" + }, + "value": { + "$id": "608", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2024-12-01" + } + }, + { + "$id": "609", + "parameter": { + "$ref": "596" + }, + "value": { + "$id": "610", + "kind": "string", + "type": { + "$ref": "597" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "611", + "parameter": { + "$ref": "599" + }, + "value": { + "$id": "612", + "kind": "string", + "type": { + "$ref": "600" + }, + "value": "eastus" + } + }, + { + "$id": "613", + "parameter": { + "$ref": "601" + }, + "value": { + "$id": "614", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "ScalableExecution" + } + } + ], + "responses": [ + { + "$id": "615", + "response": { + "$ref": "605" + }, + "statusCode": 200, + "bodyValue": { + "$id": "616", + "kind": "model", + "type": { + "$ref": "154" + }, + "value": { + "$id": "617", + "id": { + "$id": "618", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution" + }, + "name": { + "$id": "619", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "ScalableExecution" + }, + "type": { + "$id": "620", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/Locations/Quotas" + }, + "properties": { + "$id": "621", + "kind": "model", + "type": { + "$ref": "156" + }, + "value": { + "$id": "622", + "freeTrial": { + "$id": "623", + "kind": "model", + "type": { + "$ref": "158" + }, + "value": { + "$id": "624", + "accountId": { + "$id": "625", + "kind": "string", + "type": { + "$ref": "160" + }, + "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "state": { + "$id": "626", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Active" + } + } + }, + "offeringType": { + "$id": "627", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "NotApplicable" + }, + "provisioningState": { + "$id": "628", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "629", + "Name": "listBySubscription", + "ResourceName": "Quota", + "Doc": "List quotas for a given subscription Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "630", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "632", + "Type": { + "$id": "633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "634", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "635", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "636", + "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": "637", + "Name": "location", + "NameInRequest": "location", + "Doc": "The location of quota in ARM Normalized format like eastus, southeastasia etc.", + "Type": { + "$id": "638", + "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": "639", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "640", + "kind": "constant", + "valueType": { + "$id": "641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "642", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "164" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas", + "BufferResponse": true, + "Paging": { + "$id": "643", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.Quotas.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "644", + "kind": "http", + "name": "Quotas_ListBySubscription", + "description": "Quotas_ListBySubscription", + "filePath": "2024-12-01/Quotas_ListBySubscription.json", + "parameters": [ + { + "$id": "645", + "parameter": { + "$ref": "630" + }, + "value": { + "$id": "646", + "kind": "string", + "type": { + "$ref": "631" + }, + "value": "2024-12-01" + } + }, + { + "$id": "647", + "parameter": { + "$ref": "634" + }, + "value": { + "$id": "648", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "649", + "parameter": { + "$ref": "637" + }, + "value": { + "$id": "650", + "kind": "string", + "type": { + "$ref": "638" + }, + "value": "eastus" + } + } + ], + "responses": [ + { + "$id": "651", + "response": { + "$ref": "642" + }, + "statusCode": 200, + "bodyValue": { + "$id": "652", + "kind": "model", + "type": { + "$ref": "164" + }, + "value": { + "$id": "653", + "value": { + "$id": "654", + "kind": "array", + "type": { + "$ref": "166" + }, + "value": [ + { + "$id": "655", + "kind": "model", + "type": { + "$ref": "154" + }, + "value": { + "$id": "656", + "properties": { + "$id": "657", + "kind": "model", + "type": { + "$ref": "156" + }, + "value": { + "$id": "658", + "freeTrial": { + "$id": "659", + "kind": "model", + "type": { + "$ref": "158" + }, + "value": { + "$id": "660", + "accountId": { + "$id": "661", + "kind": "string", + "type": { + "$ref": "160" + }, + "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "state": { + "$id": "662", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Active" + } + } + }, + "offeringType": { + "$id": "663", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "NotApplicable" + }, + "provisioningState": { + "$id": "664", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "665", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution" + }, + "name": { + "$id": "666", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "ScalableExecution" + }, + "type": { + "$id": "667", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/Locations/Quotas" + } + } + }, + { + "$id": "668", + "kind": "model", + "type": { + "$ref": "154" + }, + "value": { + "$id": "669", + "properties": { + "$id": "670", + "kind": "model", + "type": { + "$ref": "156" + }, + "value": { + "$id": "671", + "freeTrial": { + "$id": "672", + "kind": "model", + "type": { + "$ref": "158" + }, + "value": { + "$id": "673", + "accountId": { + "$id": "674", + "kind": "string", + "type": { + "$ref": "160" + }, + "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "state": { + "$id": "675", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "Active" + } + } + }, + "offeringType": { + "$id": "676", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "PrivatePreview" + }, + "provisioningState": { + "$id": "677", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "678", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/Reporting" + }, + "name": { + "$id": "679", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Reporting" + }, + "type": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/Locations/Quotas" + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "681" + }, + "Parent": "AzurePlaywrightServiceClient", + "Parameters": [ + { + "$id": "682", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "683", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "684", + "Type": { + "$id": "685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + }, + { + "$id": "686", + "Name": "AccountQuotas", + "Operations": [ + { + "$id": "687", + "Name": "get", + "ResourceName": "AccountQuota", + "Doc": "Get quota by name for an account.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "688", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "690", + "Type": { + "$id": "691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "692", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "693", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "694", + "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": "695", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "696", + "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": "697", + "Name": "accountName", + "NameInRequest": "accountName", + "Doc": "Name of account.", + "Type": { + "$id": "698", + "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": "699", + "Name": "quotaName", + "NameInRequest": "quotaName", + "Doc": "The Playwright service account quota name.", + "Type": { + "$ref": "2" + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "700", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "701", + "kind": "constant", + "valueType": { + "$id": "702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "703", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "88" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotas.get", + "Decorators": [], + "Examples": [ + { + "$id": "704", + "kind": "http", + "name": "AccountQuotas_Get", + "description": "AccountQuotas_Get", + "filePath": "2024-12-01/AccountQuotas_Get.json", + "parameters": [ + { + "$id": "705", + "parameter": { + "$ref": "688" + }, + "value": { + "$id": "706", + "kind": "string", + "type": { + "$ref": "689" + }, + "value": "2024-12-01" + } + }, + { + "$id": "707", + "parameter": { + "$ref": "692" + }, + "value": { + "$id": "708", + "kind": "string", + "type": { + "$ref": "693" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "709", + "parameter": { + "$ref": "695" + }, + "value": { + "$id": "710", + "kind": "string", + "type": { + "$ref": "696" + }, + "value": "dummyrg" + } + }, + { + "$id": "711", + "parameter": { + "$ref": "697" + }, + "value": { + "$id": "712", + "kind": "string", + "type": { + "$ref": "698" + }, + "value": "myPlaywrightAccount" + } + }, + { + "$id": "713", + "parameter": { + "$ref": "699" + }, + "value": { + "$id": "714", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "ScalableExecution" + } + } + ], + "responses": [ + { + "$id": "715", + "response": { + "$ref": "703" + }, + "statusCode": 200, + "bodyValue": { + "$id": "716", + "kind": "model", + "type": { + "$ref": "88" + }, + "value": { + "$id": "717", + "id": { + "$id": "718", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/ScalableExecution" + }, + "name": { + "$id": "719", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "ScalableExecution" + }, + "type": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/Accounts/Quotas" + }, + "properties": { + "$id": "721", + "kind": "model", + "type": { + "$ref": "114" + }, + "value": { + "$id": "722", + "freeTrial": { + "$id": "723", + "kind": "model", + "type": { + "$ref": "116" + }, + "value": { + "$id": "724", + "createdAt": { + "$id": "725", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "expiryAt": { + "$id": "726", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "allocatedValue": { + "$id": "727", + "kind": "number", + "type": { + "$ref": "124" + }, + "value": 0 + }, + "usedValue": { + "$id": "728", + "kind": "number", + "type": { + "$ref": "126" + }, + "value": 0 + }, + "percentageUsed": { + "$id": "729", + "kind": "number", + "type": { + "$ref": "128" + }, + "value": 100 + } + } + }, + "provisioningState": { + "$id": "730", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "731", + "Name": "listByAccount", + "ResourceName": "AccountQuota", + "Doc": "List quotas for a given account.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "732", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "734", + "Type": { + "$id": "735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "736", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "737", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "738", + "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": "739", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "740", + "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": "741", + "Name": "accountName", + "NameInRequest": "accountName", + "Doc": "Name of account.", + "Type": { + "$id": "742", + "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": "743", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "744", + "kind": "constant", + "valueType": { + "$id": "745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "746", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "148" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas", + "BufferResponse": true, + "Paging": { + "$id": "747", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzurePlaywrightService.AccountQuotas.listByAccount", + "Decorators": [], + "Examples": [ + { + "$id": "748", + "kind": "http", + "name": "AccountQuotas_ListByAccount", + "description": "AccountQuotas_ListByAccount", + "filePath": "2024-12-01/AccountQuotas_ListByAccount.json", + "parameters": [ + { + "$id": "749", + "parameter": { + "$ref": "732" + }, + "value": { + "$id": "750", + "kind": "string", + "type": { + "$ref": "733" + }, + "value": "2024-12-01" + } + }, + { + "$id": "751", + "parameter": { + "$ref": "736" + }, + "value": { + "$id": "752", + "kind": "string", + "type": { + "$ref": "737" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "753", + "parameter": { + "$ref": "739" + }, + "value": { + "$id": "754", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "dummyrg" + } + }, + { + "$id": "755", + "parameter": { + "$ref": "741" + }, + "value": { + "$id": "756", + "kind": "string", + "type": { + "$ref": "742" + }, + "value": "myPlaywrightAccount" + } + } + ], + "responses": [ + { + "$id": "757", + "response": { + "$ref": "746" + }, + "statusCode": 200, + "bodyValue": { + "$id": "758", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "759", + "value": { + "$id": "760", + "kind": "array", + "type": { + "$ref": "150" + }, + "value": [ + { + "$id": "761", + "kind": "model", + "type": { + "$ref": "88" + }, + "value": { + "$id": "762", + "id": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/ScalableExecution" + }, + "name": { + "$id": "764", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "ScalableExecution" + }, + "type": { + "$id": "765", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/Accounts/Quotas" + }, + "properties": { + "$id": "766", + "kind": "model", + "type": { + "$ref": "114" + }, + "value": { + "$id": "767", + "freeTrial": { + "$id": "768", + "kind": "model", + "type": { + "$ref": "116" + }, + "value": { + "$id": "769", + "createdAt": { + "$id": "770", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "expiryAt": { + "$id": "771", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "allocatedValue": { + "$id": "772", + "kind": "number", + "type": { + "$ref": "124" + }, + "value": 0 + }, + "usedValue": { + "$id": "773", + "kind": "number", + "type": { + "$ref": "126" + }, + "value": 0 + }, + "percentageUsed": { + "$id": "774", + "kind": "number", + "type": { + "$ref": "128" + }, + "value": 100 + } + } + }, + "provisioningState": { + "$id": "775", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "776", + "kind": "model", + "type": { + "$ref": "88" + }, + "value": { + "$id": "777", + "id": { + "$id": "778", + "kind": "string", + "type": { + "$ref": "92" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/Reporting" + }, + "name": { + "$id": "779", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Reporting" + }, + "type": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.AzurePlaywrightService/Accounts/Quotas" + }, + "properties": { + "$id": "781", + "kind": "model", + "type": { + "$ref": "114" + }, + "value": { + "$id": "782", + "freeTrial": { + "$id": "783", + "kind": "model", + "type": { + "$ref": "116" + }, + "value": { + "$id": "784", + "createdAt": { + "$id": "785", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "expiryAt": { + "$id": "786", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2023-08-31T10:19:36.081Z" + }, + "allocatedValue": { + "$id": "787", + "kind": "number", + "type": { + "$ref": "124" + }, + "value": 0 + }, + "usedValue": { + "$id": "788", + "kind": "number", + "type": { + "$ref": "126" + }, + "value": 0 + }, + "percentageUsed": { + "$id": "789", + "kind": "number", + "type": { + "$ref": "128" + }, + "value": 100 + } + } + }, + "provisioningState": { + "$id": "790", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "791" + }, + "Parent": "AzurePlaywrightServiceClient", + "Parameters": [ + { + "$id": "792", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "793", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "794", + "Type": { + "$id": "795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + } + ], + "Auth": { + "$id": "796", + "OAuth2": { + "$id": "797", + "Scopes": [ + "user_impersonation" + ] + } + } +}